mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
Merge branch '5729_fix_inspector_crash' into 'main'
inspector: fix crash caused by uninitialized GVariant Closes #5729 See merge request GNOME/gtk!5799
This commit is contained in:
commit
a96df553e0
@ -172,10 +172,9 @@ bind_parameter_cb (GtkSignalListItemFactory *factory,
|
||||
name = action_holder_get_name (ACTION_HOLDER (item));
|
||||
if (G_IS_ACTION_GROUP (owner))
|
||||
parameter = (const char *)g_action_group_get_action_parameter_type (G_ACTION_GROUP (owner), name);
|
||||
else if (GTK_IS_ACTION_MUXER (owner))
|
||||
gtk_action_muxer_query_action (GTK_ACTION_MUXER (owner), name,
|
||||
NULL, (const GVariantType **)¶meter, NULL, NULL, NULL);
|
||||
else
|
||||
else if (!GTK_IS_ACTION_MUXER (owner) ||
|
||||
!gtk_action_muxer_query_action (GTK_ACTION_MUXER (owner), name,
|
||||
NULL, (const GVariantType **)¶meter, NULL, NULL, NULL))
|
||||
parameter = "(Unknown)";
|
||||
|
||||
gtk_label_set_label (GTK_LABEL (label), parameter);
|
||||
@ -212,10 +211,9 @@ bind_state_cb (GtkSignalListItemFactory *factory,
|
||||
name = action_holder_get_name (ACTION_HOLDER (item));
|
||||
if (G_IS_ACTION_GROUP (owner))
|
||||
state = g_action_group_get_action_state (G_ACTION_GROUP (owner), name);
|
||||
else if (GTK_IS_ACTION_MUXER (owner))
|
||||
gtk_action_muxer_query_action (GTK_ACTION_MUXER (owner), name,
|
||||
NULL, NULL, NULL, NULL, &state);
|
||||
else
|
||||
else if (!GTK_IS_ACTION_MUXER (owner) ||
|
||||
!gtk_action_muxer_query_action (GTK_ACTION_MUXER (owner), name,
|
||||
NULL, NULL, NULL, NULL, &state))
|
||||
state = NULL;
|
||||
|
||||
if (state)
|
||||
|
Loading…
Reference in New Issue
Block a user