inspector: be defensive against out parameters

Set initial state to NULL so that we don't risk accessing an unset out
parameter.

Fixes a crash when activating certain actions.
This commit is contained in:
Christian Hergert 2023-03-03 12:17:07 -08:00
parent dbb2cb22ca
commit 32cf104167

View File

@ -185,7 +185,7 @@ action_state_changed_cb (GActionGroup *group,
static void
update_widgets (GtkInspectorActionEditor *r)
{
GVariant *state;
GVariant *state = NULL;
if (G_IS_ACTION_GROUP (r->owner))
g_action_group_query_action (G_ACTION_GROUP (r->owner), r->name,