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:
committed by
Matthias Clasen
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;
|
||||
|
||||
Reference in New Issue
Block a user