Blob Blame History Raw
diff -upr eom-1.10.1-orig/src/eom-window.c eom-1.10.1/src/eom-window.c
--- eom-1.10.1-orig/src/eom-window.c	2015-05-05 11:34:52.000000000 +0200
+++ eom-1.10.1/src/eom-window.c	2015-06-12 18:33:14.863768439 +0200
@@ -4458,7 +4458,7 @@ eom_window_construct_ui (EomWindow *wind
 
 	gtk_box_pack_start (GTK_BOX (priv->layout), hpaned, TRUE, TRUE, 0);
 
-	priv->thumbview = eom_thumb_view_new ();
+	priv->thumbview = g_object_ref (eom_thumb_view_new ());
 
 	/* giving shape to the view */
 	gtk_icon_view_set_margin (GTK_ICON_VIEW (priv->thumbview), 4);
@@ -4587,6 +4587,16 @@ eom_window_dispose (GObject *object)
 		priv->page_setup = NULL;
 	}
 
+	if (priv->thumbview)
+	{
+		/* Disconnect so we don't get any unwanted callbacks
+		 * when the thumb view is disposed. */
+		g_signal_handlers_disconnect_by_func (priv->thumbview,
+		                 G_CALLBACK (handle_image_selection_changed_cb),
+		                 window);
+		g_clear_object (&priv->thumbview);
+	}
+
 	eom_plugin_engine_garbage_collect ();
 
 	if (priv->store != NULL) {