aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-toolbars-model.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-08-22 19:02:10 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-08-22 19:02:10 +0800
commit3e3d3961a8db405b5717cd0c02d67aa8abb8842b (patch)
tree0ba2fc9002d9227b7d33417a489addc9f6875dd5 /src/ephy-toolbars-model.c
parent17ebc02eeb18c2084823ef8555705087588719f3 (diff)
downloadgsoc2013-epiphany-3e3d3961a8db405b5717cd0c02d67aa8abb8842b.tar
gsoc2013-epiphany-3e3d3961a8db405b5717cd0c02d67aa8abb8842b.tar.gz
gsoc2013-epiphany-3e3d3961a8db405b5717cd0c02d67aa8abb8842b.tar.bz2
gsoc2013-epiphany-3e3d3961a8db405b5717cd0c02d67aa8abb8842b.tar.lz
gsoc2013-epiphany-3e3d3961a8db405b5717cd0c02d67aa8abb8842b.tar.xz
gsoc2013-epiphany-3e3d3961a8db405b5717cd0c02d67aa8abb8842b.tar.zst
gsoc2013-epiphany-3e3d3961a8db405b5717cd0c02d67aa8abb8842b.zip
Make it NULL safe
2003-08-22 Marco Pesenti Gritti <marco@gnome.org> * lib/widgets/ephy-node-view.c: (compare_string_values), (ephy_node_view_sort_func): * src/bookmarks/ephy-bookmarks-menu.c: (sort_topics), (sort_bookmarks): * src/bookmarks/ephy-topic-action.c: (sort_bookmarks), (sort_topics): Make it NULL safe * src/ephy-toolbars-model.c: (impl_get_item_id): When creating bookmark, if the title is unknown, use untitled.
Diffstat (limited to 'src/ephy-toolbars-model.c')
-rwxr-xr-xsrc/ephy-toolbars-model.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ephy-toolbars-model.c b/src/ephy-toolbars-model.c
index 3933be965..6384b06e5 100755
--- a/src/ephy-toolbars-model.c
+++ b/src/ephy-toolbars-model.c
@@ -28,6 +28,7 @@
#include "ephy-string.h"
#include <string.h>
+#include <bonobo/bonobo-i18n.h>
static void ephy_toolbars_model_class_init (EphyToolbarsModelClass *klass);
static void ephy_toolbars_model_init (EphyToolbarsModel *t);
@@ -188,8 +189,15 @@ impl_get_item_id (EggToolbarsModel *t,
/* Create the bookmark, it does not exist */
EphyHistory *gh;
const char *icon;
+ const char *title;
- node = ephy_bookmarks_add (bookmarks, netscape_url[NAME], netscape_url[URL]);
+ title = netscape_url[NAME];
+ if (title == NULL || *title == '\0')
+ {
+ title = _("Untitled");
+ }
+
+ node = ephy_bookmarks_add (bookmarks, title, netscape_url[URL]);
g_return_val_if_fail (node != NULL, NULL);
gh = ephy_embed_shell_get_global_history (EPHY_EMBED_SHELL (ephy_shell));