gtkclipboard: Fix a potential g_signal_handler_disconnect(NULL) call

Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
This commit is contained in:
Philip Withnall 2013-11-28 20:43:16 +00:00
parent af36220bca
commit f8eac08a0a

View File

@ -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);