projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba69a30
)
Check for NULL groups in gtk_action_muxer_get_group ()
author
Luca Bacci
<luca.bacci982@gmail.com>
Wed, 17 May 2023 12:00:56 +0000
(14:00 +0200)
committer
Matthias Clasen
<mclasen@redhat.com>
Mon, 5 Jun 2023 12:00:43 +0000
(08:00 -0400)
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
patch
|
blob
|
history
diff --git
a/gtk/gtkactionmuxer.c
b/gtk/gtkactionmuxer.c
index 760f796354557da1292ffdd2ea6c498c11575410..47aaf0c92c7887013faeb5675054de605df20c3d 100644
(file)
--- 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;