Fix few segfaults on broken schemas - but there are more
This commit is contained in:
parent
d355d875a7
commit
1171f13e9e
4 changed files with 17 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
2002-03-19 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* gnome-keyboard-properties.c (bell_to_widget): Check that
|
||||
value actually is string - that fixes crash with broken schemas
|
||||
|
||||
2002-03-10 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* gnome-keyboard-properties.c: (main):
|
||||
|
|
|
@ -150,9 +150,11 @@ bell_to_widget (GConfValue *value)
|
|||
gint val = 2;
|
||||
|
||||
new_value = gconf_value_new (GCONF_VALUE_INT);
|
||||
gconf_string_to_enum (bell_enums,
|
||||
gconf_value_get_string (value),
|
||||
&val);
|
||||
if (value->type == GCONF_VALUE_STRING) {
|
||||
gconf_string_to_enum (bell_enums,
|
||||
gconf_value_get_string (value),
|
||||
&val);
|
||||
}
|
||||
gconf_value_set_int (new_value, val);
|
||||
|
||||
return new_value;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2002-03-19 Lauris Kaplinski <lauris@ximian.com>
|
||||
|
||||
* capplet-dir.c (find_icon): Do not do nasty things with NULL
|
||||
|
||||
2002-03-12 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* capplet-dir-view.h: Move CappletDirViewLayout enum here,
|
||||
|
|
|
@ -57,11 +57,10 @@ GHashTable *capplet_hash = NULL;
|
|||
static char *
|
||||
find_icon (const char *icon, GnomeDesktopItem *dentry)
|
||||
{
|
||||
char *icon_file = strdup (icon);
|
||||
char *icon_file = NULL;
|
||||
|
||||
if (icon_file[0] == 0) {
|
||||
g_free(icon_file);
|
||||
icon_file = NULL;
|
||||
if (icon && icon[0]) {
|
||||
icon_file = g_strdup (icon);
|
||||
}
|
||||
|
||||
if (icon_file) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue