summaryrefslogtreecommitdiff
path: root/libgnome-desktop
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2014-12-10 23:41:11 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2014-12-10 23:42:59 +0000
commit5b28350d3229d36d7c64084e52f5a40ee5903723 (patch)
treeb19891ff9e475ecb63a449dd4f82718d4023d457 /libgnome-desktop
parent3019eb8cbbcac06055ee1fe6543f168c5bb53604 (diff)
downloadgnome-desktop-5b28350d3229d36d7c64084e52f5a40ee5903723.tar.gz
thumbnail: Fix a code path where the mutex is never unlocked
Fix one unusual code path where the GnomeDesktopThumbnailFactory’s mutex is not unlocked before the function returns. As well as the usual deadlock issues, this would lead to an abort on shutdown with recent GLib changes, as g_mutex_clear() would be called on the locked mutex, which GLib now (correctly) complains about. https://bugzilla.gnome.org/show_bug.cgi?id=740666
Diffstat (limited to 'libgnome-desktop')
-rw-r--r--libgnome-desktop/gnome-desktop-thumbnail.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
index eb50f371..7a1963bd 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
@@ -941,10 +941,11 @@ external_thumbnailers_disabled_changed_cb (GSettings *setting
g_mutex_lock (&priv->lock);
- if (priv->disabled)
- return;
- g_strfreev (priv->disabled_types);
- priv->disabled_types = g_settings_get_strv (priv->settings, "disable");
+ if (!priv->disabled)
+ {
+ g_strfreev (priv->disabled_types);
+ priv->disabled_types = g_settings_get_strv (priv->settings, "disable");
+ }
g_mutex_unlock (&priv->lock);
}