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>
|
2002-03-10 Seth Nickell <snickell@stanford.edu>
|
||||||
|
|
||||||
* gnome-keyboard-properties.c: (main):
|
* gnome-keyboard-properties.c: (main):
|
||||||
|
|
|
@ -150,9 +150,11 @@ bell_to_widget (GConfValue *value)
|
||||||
gint val = 2;
|
gint val = 2;
|
||||||
|
|
||||||
new_value = gconf_value_new (GCONF_VALUE_INT);
|
new_value = gconf_value_new (GCONF_VALUE_INT);
|
||||||
gconf_string_to_enum (bell_enums,
|
if (value->type == GCONF_VALUE_STRING) {
|
||||||
gconf_value_get_string (value),
|
gconf_string_to_enum (bell_enums,
|
||||||
&val);
|
gconf_value_get_string (value),
|
||||||
|
&val);
|
||||||
|
}
|
||||||
gconf_value_set_int (new_value, val);
|
gconf_value_set_int (new_value, val);
|
||||||
|
|
||||||
return new_value;
|
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>
|
2002-03-12 Richard Hestilow <hestilow@ximian.com>
|
||||||
|
|
||||||
* capplet-dir-view.h: Move CappletDirViewLayout enum here,
|
* capplet-dir-view.h: Move CappletDirViewLayout enum here,
|
||||||
|
|
|
@ -57,11 +57,10 @@ GHashTable *capplet_hash = NULL;
|
||||||
static char *
|
static char *
|
||||||
find_icon (const char *icon, GnomeDesktopItem *dentry)
|
find_icon (const char *icon, GnomeDesktopItem *dentry)
|
||||||
{
|
{
|
||||||
char *icon_file = strdup (icon);
|
char *icon_file = NULL;
|
||||||
|
|
||||||
if (icon_file[0] == 0) {
|
if (icon && icon[0]) {
|
||||||
g_free(icon_file);
|
icon_file = g_strdup (icon);
|
||||||
icon_file = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (icon_file) {
|
if (icon_file) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue