[gimp] libgimp: don't connect a NULL destroy notify



commit 6b2624f0219dd846a6df1aad3f89c0cd98dd604d
Author: Michael Natterer <mitch gimp org>
Date:   Wed Aug 7 23:45:25 2019 +0200

    libgimp: don't connect a NULL destroy notify

 libgimp/gimpitemcombobox.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/libgimp/gimpitemcombobox.c b/libgimp/gimpitemcombobox.c
index b8bc67df13..4c2993323c 100644
--- a/libgimp/gimpitemcombobox.c
+++ b/libgimp/gimpitemcombobox.c
@@ -370,7 +370,8 @@ gimp_item_combo_box_new (GType                  type,
   private->constraint = constraint;
   private->data       = data;
 
-  g_object_weak_ref (G_OBJECT (combo_box), (GWeakNotify) data_destroy, data);
+  if (data_destroy)
+    g_object_weak_ref (G_OBJECT (combo_box), (GWeakNotify) data_destroy, data);
 
   gimp_item_combo_box_populate (combo_box);
 


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