From d642072603aa6714477eaa2876a909a7e7fc8cea Mon Sep 17 00:00:00 2001 From: Luca Bacci Date: Wed, 17 May 2023 14:00:56 +0200 Subject: [PATCH] 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 --- gtk/gtkactionmuxer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkactionmuxer.c b/gtk/gtkactionmuxer.c index 33e8c0542d..157b133c7e 100644 --- a/gtk/gtkactionmuxer.c +++ b/gtk/gtkactionmuxer.c @@ -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; -- 2.30.2