diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-06-21 19:30:51 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-06-21 19:30:51 +0800 |
commit | 73416d200f6a1ccce28781321bc670acf83a858d (patch) | |
tree | 032f5735f82fddfc53b6082f8df63fd4ca7e5351 | |
parent | e6d35d8000a1edc16d074e7547a4cfc9d9a0d3eb (diff) | |
download | gsoc2013-epiphany-73416d200f6a1ccce28781321bc670acf83a858d.tar gsoc2013-epiphany-73416d200f6a1ccce28781321bc670acf83a858d.tar.gz gsoc2013-epiphany-73416d200f6a1ccce28781321bc670acf83a858d.tar.bz2 gsoc2013-epiphany-73416d200f6a1ccce28781321bc670acf83a858d.tar.lz gsoc2013-epiphany-73416d200f6a1ccce28781321bc670acf83a858d.tar.xz gsoc2013-epiphany-73416d200f6a1ccce28781321bc670acf83a858d.tar.zst gsoc2013-epiphany-73416d200f6a1ccce28781321bc670acf83a858d.zip |
Check for empty attributes before adding the item when parsing the
2004-06-21 Christian Persch <chpe@cvs.gnome.org>
* lib/egg/egg-toolbars-model.c: (parse_item_list):
Check for empty attributes before adding the item when parsing
the toolbars file. Should fix bug #144698
-rw-r--r-- | ChangeLog | 7 | ||||
-rwxr-xr-x | lib/egg/egg-toolbars-model.c | 17 |
2 files changed, 17 insertions, 7 deletions
@@ -1,5 +1,12 @@ 2004-06-21 Christian Persch <chpe@cvs.gnome.org> + * lib/egg/egg-toolbars-model.c: (parse_item_list): + + Check for empty attributes before adding the item when parsing + the toolbars file. Should fix bug #144698 + +2004-06-21 Christian Persch <chpe@cvs.gnome.org> + * src/bookmarks/ephy-bookmarks-import.c: (ephy_bookmarks_import): Allow importing from Epiphany bookmarks format (RDF), diff --git a/lib/egg/egg-toolbars-model.c b/lib/egg/egg-toolbars-model.c index 0da5cbd69..0e308c472 100755 --- a/lib/egg/egg-toolbars-model.c +++ b/lib/egg/egg-toolbars-model.c @@ -361,17 +361,20 @@ parse_item_list (EggToolbarsModel *t, type = xmlGetProp (child, "type"); if (type == NULL) { - type = g_strdup (EGG_TOOLBAR_ITEM_TYPE); + type = xmlStrdup (EGG_TOOLBAR_ITEM_TYPE); } - id = egg_toolbars_model_get_item_id (t, type, name); - if (id != NULL) + if (name != NULL && name[0] != '\0' && type != NULL) { - egg_toolbars_model_add_item (t, position, -1, id, type); - } + id = egg_toolbars_model_get_item_id (t, type, name); + if (id != NULL) + { + egg_toolbars_model_add_item (t, position, -1, id, type); + } + g_free (id); + } xmlFree (name); - g_free (type); - g_free (id); + xmlFree (type); } else if (xmlStrEqual (child->name, "separator")) { |