From db2eb5270ff0393c5bfa48ee08894445ddf03500 Mon Sep 17 00:00:00 2001 From: Eric Koegel Date: Sun, 14 Jun 2015 16:00:43 +0300 Subject: [PATCH] Remove preview thread when needed (Bug #11892) Ensure we remove the old preview thread when a change event happens. Otherwise we won't fire up a new one to populate the icon view. --- settings/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/settings/main.c b/settings/main.c index 312806a..21eaae7 100644 --- a/settings/main.c +++ b/settings/main.c @@ -1091,6 +1091,12 @@ xfdesktop_settings_stop_image_loading(AppearancePanel *panel) /* stop any thumbnailing in progress */ xfdesktop_thumbnailer_dequeue_all_thumbnails(panel->thumbnailer); + /* Remove the preview thread */ + if(panel->preview_thread != NULL) { + g_thread_unref (panel->preview_thread); + panel->preview_thread = NULL; + } + /* Remove the previews in the message queue */ if(panel->preview_queue != NULL) { while(g_async_queue_length(panel->preview_queue) > 0) { -- 2.4.3