forked from AuroraMiddleware/gtk
settings: Avoid a segfault when loading keyfile
When the keyfile is loaded, no screen exists yet, so we need to vheck for that.
This commit is contained in:
parent
c844a24ae6
commit
399dc74d74
@ -2671,7 +2671,7 @@ settings_update_color_scheme (GtkSettings *settings)
|
||||
data, (GDestroyNotify) color_scheme_data_free);
|
||||
|
||||
g_value_init (&value, G_TYPE_STRING);
|
||||
if (gdk_screen_get_setting (priv->screen, "gtk-color-scheme", &value))
|
||||
if (priv->screen && gdk_screen_get_setting (priv->screen, "gtk-color-scheme", &value))
|
||||
{
|
||||
merge_color_scheme (settings, &value, GTK_SETTINGS_SOURCE_XSETTING);
|
||||
g_value_unset (&value);
|
||||
|
Loading…
Reference in New Issue
Block a user