From a55b84f52446396af812349be2c34ed5ed57a3a2 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 760f796354..47aaf0c92c 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