[balsa/wip/gtk4: 60/351] Do not connect to NULL widget



commit a906842ab67bd210bdaeef1a033948440ce570d7
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu Nov 9 13:08:28 2017 -0500

    Do not connect to NULL widget

 src/balsa-mime-widget-image.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/balsa-mime-widget-image.c b/src/balsa-mime-widget-image.c
index 29aee3b..5699fd5 100644
--- a/src/balsa-mime-widget-image.c
+++ b/src/balsa-mime-widget-image.c
@@ -101,8 +101,6 @@ balsa_mime_widget_new_image(BalsaMessage * bm,
 #ifdef WE_STILL_NEED_AN_EVENT_BOX
     mw->widget = gtk_event_box_new();
 #endif
-    g_signal_connect(G_OBJECT(mw->widget), "button-press-event",
-                     G_CALLBACK(balsa_image_button_press_cb), data);
 
     image = gtk_image_new_from_icon_name("image-missing",
                                          GTK_ICON_SIZE_BUTTON);
@@ -115,6 +113,8 @@ balsa_mime_widget_new_image(BalsaMessage * bm,
 #else
     mw->widget = image;
 #endif
+    g_signal_connect(G_OBJECT(mw->widget), "button-press-event",
+                     G_CALLBACK(balsa_image_button_press_cb), data);
 
     return mw;
 }


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