[gtk/gtk-4-6] actionmuxer: set handler ids initially to zero



commit ce003f4eecaf4f5d5d4523c2242d2ca063e9238a
Author: Christian Hergert <chergert redhat com>
Date:   Mon May 2 14:55:55 2022 -0700

    actionmuxer: set handler ids initially to zero
    
    These were getting created with possible non-zero values and then inserted
    into a hashtable where the readers may not know the state of the group.
    
    Ensure those values are set to zero until we assign them below.

 gtk/gtkactionmuxer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkactionmuxer.c b/gtk/gtkactionmuxer.c
index 06660ddf89..60ee06dc58 100644
--- a/gtk/gtkactionmuxer.c
+++ b/gtk/gtkactionmuxer.c
@@ -1269,7 +1269,7 @@ gtk_action_muxer_insert (GtkActionMuxer *muxer,
   if (!muxer->groups)
     muxer->groups = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, gtk_action_muxer_free_group);
 
-  group = g_slice_new (Group);
+  group = g_slice_new0 (Group);
   group->muxer = muxer;
   group->group = g_object_ref (action_group);
   group->prefix = g_strdup (prefix);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]