From: Luca Bacci Date: Wed, 17 May 2023 12:00:56 +0000 (+0200) Subject: Check for NULL groups in gtk_action_muxer_get_group () X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~3^2~1^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a55b84f52446396af812349be2c34ed5ed57a3a2;p=gtk4.git 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 --- 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;