aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks-import.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-01-29 03:00:37 +0800
committerChristian Persch <chpe@src.gnome.org>2004-01-29 03:00:37 +0800
commitc00045335cefa6e2b657934424dcb25a55da9e08 (patch)
treea141aa597721faecc45ff1bbe04251ec82bef646 /src/bookmarks/ephy-bookmarks-import.c
parent65b46c9e9e72d31a3a8937c4774f91b549fb214d (diff)
downloadgsoc2013-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/bookmarks/ephy-bookmarks-import.c')
-rw-r--r--src/bookmarks/ephy-bookmarks-import.c10
1 files changed, 9 insertions, 1 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;