[gtk+] settings: Avoid a segfault when loading keyfile
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] settings: Avoid a segfault when loading keyfile
- Date: Wed, 2 Mar 2011 15:23:24 +0000 (UTC)
commit 399dc74d74d4996da886e6fd1ecf0c8b3905eb05
Author: Benjamin Otte <otte redhat com>
Date: Wed Mar 2 16:21:44 2011 +0100
settings: Avoid a segfault when loading keyfile
When the keyfile is loaded, no screen exists yet, so we need to vheck
for that.
gtk/gtksettings.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 44fe5c6..e254406 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]