summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2008-10-27 11:52:47 +0000
committerThomas James Alexander Thurman <tthurman@src.gnome.org>2008-10-27 11:52:47 +0000
commit5ed940e101d81fd1cbcca87df48242a51d449389 (patch)
tree2898140d90e6fdff46dcc76eaf164a874a3ce558 /src/core
parent11f18a25c2bdda224ea98bdcbdb73889ef09cdd5 (diff)
downloadmetacity-5ed940e101d81fd1cbcca87df48242a51d449389.tar.gz
Fix some crashes with the new GDM 2.24. Closes #558058.
2008-10-27 Brian Cameron <brian.cameron@sun.com> Fix some crashes with the new GDM 2.24. Closes #558058. * src/ui/ui.c (meta_ui_parse_modifier): another null check * src/core/prefs.c (titlebar_handler, button_layout_handler): more null checks. svn path=/trunk/; revision=4003
Diffstat (limited to 'src/core')
-rw-r--r--src/core/prefs.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 267eb47b..4d37a65c 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -1326,13 +1326,14 @@ titlebar_handler (MetaPreference pref,
{
PangoFontDescription *new_desc;
- new_desc = pango_font_description_from_string (string_value);
+ if (string_value)
+ new_desc = pango_font_description_from_string (string_value);
if (new_desc == NULL)
{
meta_warning (_("Could not parse font description "
"\"%s\" from GConf key %s\n"),
- string_value,
+ string_value ? string_value : "(null)",
KEY_TITLEBAR_FONT);
*inform_listeners = FALSE;
@@ -1476,16 +1477,17 @@ button_layout_handler (MetaPreference pref,
gboolean *inform_listeners)
{
MetaButtonLayout new_layout;
- char **sides;
+ char **sides = NULL;
int i;
/* We need to ignore unknown button functions, for
* compat with future versions
*/
- sides = g_strsplit (string_value, ":", 2);
+ if (string_value)
+ sides = g_strsplit (string_value, ":", 2);
- if (sides[0] != NULL)
+ if (sides != NULL && sides[0] != NULL)
{
char **buttons;
int b;
@@ -1545,7 +1547,7 @@ button_layout_handler (MetaPreference pref,
g_strfreev (buttons);
}
- if (sides[0] != NULL && sides[1] != NULL)
+ if (sides != NULL && sides[0] != NULL && sides[1] != NULL)
{
char **buttons;
int b;