[gtk+] gtkclipboard: Fix a potential g_signal_handler_disconnect(NULL) call



commit f8eac08a0a51de76864afb03eb6b3d857d6a6d40
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Thu Nov 28 20:43:16 2013 +0000

    gtkclipboard: Fix a potential g_signal_handler_disconnect(NULL) call
    
    Found by scan-build.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712760

 gtk/gtkclipboard.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkclipboard.c b/gtk/gtkclipboard.c
index d2381be..2b0f99c 100644
--- a/gtk/gtkclipboard.c
+++ b/gtk/gtkclipboard.c
@@ -286,7 +286,7 @@ gtk_clipboard_finalize (GObject *object)
   if (clipboard->store_timeout != 0)
     g_source_remove (clipboard->store_timeout);
 
-  if (clipboard->notify_signal_id != 0)
+  if (clipboard_widget != NULL && clipboard->notify_signal_id != 0)
     g_signal_handler_disconnect (clipboard_widget, clipboard->notify_signal_id);
 
   g_free (clipboard->storable_targets);


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