forked from AuroraMiddleware/gtk
bindings: Avoid iterating array if it is never set
If query.return_type is not one we want, binding_compose_params() is not called, and so params remains a NULL pointer. However, the code was then unconditionally iterating it regardless. Don't if it is still NULL. CID 1452218 (#1 of 1): Explicit null dereferenced (FORWARD_NULL) 15. var_deref_op: Dereferencing null pointer params.
This commit is contained in:
parent
79bbd4aca5
commit
2b7db2376c
@ -654,9 +654,13 @@ gtk_binding_entry_activate (GtkBindingEntry *entry,
|
||||
else
|
||||
handled = TRUE;
|
||||
|
||||
for (i = 0; i < query.n_params + 1; i++)
|
||||
g_value_unset (¶ms[i]);
|
||||
g_free (params);
|
||||
if (params != NULL)
|
||||
{
|
||||
for (i = 0; i < query.n_params + 1; i++)
|
||||
g_value_unset (¶ms[i]);
|
||||
|
||||
g_free (params);
|
||||
}
|
||||
|
||||
if (entry->destroyed)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user