Commit 5b28350d authored by Philip Withnall's avatar Philip Withnall

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
parent 3019eb8c
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment