Commit 6210e7fb authored by Matthias Clasen's avatar Matthias Clasen

GtkSettings: Properly clean up style providers

parent ab3d6a0b
......@@ -253,6 +253,9 @@ static GHashTable *get_color_hash (GtkSettings *setting
static void gtk_settings_load_from_key_file (GtkSettings *settings,
const gchar *path,
GtkSettingsSource source);
static void settings_update_provider (GdkScreen *screen,
GtkCssProvider **old,
GtkCssProvider *new);
/* the default palette for GtkColorSelelection */
static const gchar default_color_palette[] =
......@@ -1568,14 +1571,10 @@ gtk_settings_finalize (GObject *object)
g_datalist_clear (&priv->queued_settings);
if (priv->theme_provider)
g_object_unref (priv->theme_provider);
settings_update_provider (priv->screen, &priv->theme_provider, NULL);
settings_update_provider (priv->screen, &priv->key_theme_provider, NULL);
if (priv->key_theme_provider)
g_object_unref (priv->key_theme_provider);
if (priv->style)
g_object_unref (priv->style);
g_clear_object (&priv->style);
G_OBJECT_CLASS (gtk_settings_parent_class)->finalize (object);
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