mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 23:36:00 +01:00
Check return value
This commit is contained in:
parent
08b341d4f8
commit
80582c9079
1 changed files with 7 additions and 0 deletions
|
@ -441,6 +441,13 @@ handle_method_call(GDBusConnection* UNUSED(connection),
|
||||||
}
|
}
|
||||||
|
|
||||||
girara_list_t** all_rectangles = g_try_malloc0(number_of_pages * sizeof(girara_list_t*));
|
girara_list_t** all_rectangles = g_try_malloc0(number_of_pages * sizeof(girara_list_t*));
|
||||||
|
if (all_rectangles == NULL) {
|
||||||
|
girara_list_free(rectangles);
|
||||||
|
GVariant* result = g_variant_new("(b)", false);
|
||||||
|
g_dbus_method_invocation_return_value(invocation, result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (unsigned int p = 0; p != number_of_pages; ++p) {
|
for (unsigned int p = 0; p != number_of_pages; ++p) {
|
||||||
if (p == page) {
|
if (p == page) {
|
||||||
all_rectangles[p] = rectangles;
|
all_rectangles[p] = rectangles;
|
||||||
|
|
Loading…
Reference in a new issue