mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
Check for NULL groups in gtk_action_muxer_get_group ()
The groups hash table is initialized lazily when inserting the first GActionGroup (gtk_action_muxer_insert ()). Do as all surrounding code does and check for NULL before using groups. This avoids triggering a warning
This commit is contained in:
parent
ba69a30d27
commit
a55b84f524
@ -325,6 +325,9 @@ gtk_action_muxer_get_group (GtkActionMuxer *muxer,
|
||||
{
|
||||
Group *group;
|
||||
|
||||
if (!muxer->groups)
|
||||
return NULL;
|
||||
|
||||
group = g_hash_table_lookup (muxer->groups, group_name);
|
||||
if (group)
|
||||
return group->group;
|
||||
|
Loading…
Reference in New Issue
Block a user