diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-01-29 03:00:37 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-01-29 03:00:37 +0800 |
commit | c00045335cefa6e2b657934424dcb25a55da9e08 (patch) | |
tree | a141aa597721faecc45ff1bbe04251ec82bef646 /src | |
parent | 65b46c9e9e72d31a3a8937c4774f91b549fb214d (diff) | |
download | gsoc2013-epiphany-c00045335cefa6e2b657934424dcb25a55da9e08.tar gsoc2013-epiphany-c00045335cefa6e2b657934424dcb25a55da9e08.tar.gz gsoc2013-epiphany-c00045335cefa6e2b657934424dcb25a55da9e08.tar.bz2 gsoc2013-epiphany-c00045335cefa6e2b657934424dcb25a55da9e08.tar.lz gsoc2013-epiphany-c00045335cefa6e2b657934424dcb25a55da9e08.tar.xz gsoc2013-epiphany-c00045335cefa6e2b657934424dcb25a55da9e08.tar.zst gsoc2013-epiphany-c00045335cefa6e2b657934424dcb25a55da9e08.zip |
Don't crash when reading the RDF file fails.
2004-01-28 Christian Persch <chpe@cvs.gnome.org>
* src/bookmarks/ephy-bookmarks-import.c:
(ephy_bookmarks_import_rdf):
Don't crash when reading the RDF file fails.
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-import.c | 10 | ||||
-rw-r--r-- | src/bookmarks/ephy-topic-action.c | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c index d38c1f5d0..0903b37aa 100644 --- a/src/bookmarks/ephy-bookmarks-import.c +++ b/src/bookmarks/ephy-bookmarks-import.c @@ -804,7 +804,15 @@ ephy_bookmarks_import_rdf (EphyBookmarks *bookmarks, return FALSE; doc = xmlParseFile (filename); - g_assert (doc != NULL); + if (doc == NULL) + { + /* FIXME: maybe put up a warning dialogue here, because this + * is a severe dataloss? + */ + g_warning ("Failed to re-import the bookmarks. All bookmarks lost!\n"); + return FALSE; + } + root = xmlDocGetRootElement (doc); child = root->children; diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c index 1861418ff..572fede52 100644 --- a/src/bookmarks/ephy-topic-action.c +++ b/src/bookmarks/ephy-topic-action.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003 Marco Pesenti Gritti + * Copyright (C) 2003, 2004 Marco Pesenti Gritti * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ */ #ifdef HAVE_CONFIG_H -#include <config.h> +#include "config.h" #endif #include <gtk/gtktoolitem.h> |