]> git.sur5r.net Git - glabels/commitdiff
Disconnect prefs changed callback when destroying view.
authorJim Evins <evins@snaught.com>
Sat, 11 Dec 2010 04:09:40 +0000 (23:09 -0500)
committerJim Evins <evins@snaught.com>
Sat, 11 Dec 2010 04:09:40 +0000 (23:09 -0500)
This fixes a crash when changing prefs after deleting a window.

src/view.c

index 983f8e5615793f1eaa28cd4c0fd04d1cf725c537..b1550b4be3339c4e31a7d76b949a5582715f4dff 100644 (file)
@@ -347,6 +347,9 @@ gl_view_finalize (GObject *object)
        g_return_if_fail (object != NULL);
        g_return_if_fail (GL_IS_VIEW (view));
 
+        g_signal_handlers_disconnect_by_func (G_OBJECT (gl_prefs),
+                                              G_CALLBACK (prefs_changed_cb), view);
+
        G_OBJECT_CLASS (gl_view_parent_class)->finalize (object);
 
        gl_debug (DEBUG_VIEW, "END");