diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-08-29 08:21:44 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-08-29 08:21:44 +0800 |
commit | 5248c1282cdf4eed7193f6ac0827f4a68504400f (patch) | |
tree | 0012ea5b770740095900e86b254bae196140ca19 | |
parent | 894672adbec2137b654974f85cb63d14535b3364 (diff) | |
download | gsoc2013-evolution-5248c1282cdf4eed7193f6ac0827f4a68504400f.tar.gz gsoc2013-evolution-5248c1282cdf4eed7193f6ac0827f4a68504400f.tar.zst gsoc2013-evolution-5248c1282cdf4eed7193f6ac0827f4a68504400f.zip |
Handle the case when there is no URI without crashing. Only add shortcuts
* e-shortcuts.c (load_shortcuts): Handle the case when there is no
URI without crashing. Only add shortcuts when they are evolution:
URIs.
svn path=/trunk/; revision=12506
-rw-r--r-- | shell/ChangeLog | 8 | ||||
-rw-r--r-- | shell/e-shortcuts.c | 12 |
2 files changed, 14 insertions, 6 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 2b6ebf53f0..ba60165303 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,11 @@ +2001-08-28 Ettore Perazzoli <ettore@ximian.com> + + [Fix #8125, Evolution crashes while starting.] + + * e-shortcuts.c (load_shortcuts): Handle the case when there is no + URI without crashing. Only add shortcuts when they are evolution: + URIs. + 2001-08-27 Ettore Perazzoli <ettore@ximian.com> * Evolution-ShellComponent.idl: Studlycapsize all the IDs that are diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c index 6c35107be4..1f8f47b5a8 100644 --- a/shell/e-shortcuts.c +++ b/shell/e-shortcuts.c @@ -331,8 +331,8 @@ load_shortcuts (EShortcuts *shortcuts, uri = xmlNodeListGetString (doc, q->childs, 1); name = xmlGetProp (q, "name"); type = xmlGetProp (q, "type"); - - if (strncmp (uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0) { + + if (uri != NULL && strncmp (uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0) { EFolder *folder; folder = e_storage_set_get_folder (priv->storage_set, uri + E_SHELL_URI_PREFIX_LEN); @@ -362,11 +362,11 @@ load_shortcuts (EShortcuts *shortcuts, name = xmlMemStrdup (e_storage_get_display_name (storage)); } } - } - shortcut_item = shortcut_item_new (uri, name, 0, type); - shortcut_group->shortcuts = g_slist_prepend (shortcut_group->shortcuts, - shortcut_item); + shortcut_item = shortcut_item_new (uri, name, 0, type); + shortcut_group->shortcuts = g_slist_prepend (shortcut_group->shortcuts, + shortcut_item); + } if (uri != NULL) xmlFree (uri); |