aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--lib/ephy-node-db.c8
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7af0db35e..ebdaa6fb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-03-01 Christian Persch <chpe@cvs.gnome.org>
+
+ * lib/ephy-node-db.c: (ephy_node_db_load_from_file):
+
+ Guard against xml reading error, check for NULL subtree before
+ trying to parse it.
+
2004-03-01 Marco Pesenti Gritti <marco@gnome.org>
* embed/downloader-view.c: (downloader_view_add_download),
diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c
index 874b2a30a..21cba5de0 100644
--- a/lib/ephy-node-db.c
+++ b/lib/ephy-node-db.c
@@ -348,13 +348,15 @@ ephy_node_db_load_from_file (EphyNodeDb *db,
&& type == XML_READER_TYPE_ELEMENT)
{
xmlNodePtr subtree;
- EphyNode *node;
/* grow the subtree and load the node from it */
subtree = xmlTextReaderExpand (reader);
- node = ephy_node_new_from_xml (db, subtree);
-
+ if (subtree != NULL)
+ {
+ ephy_node_new_from_xml (db, subtree);
+ }
+
skip = TRUE;
}
else if (xmlStrEqual (name, xml_root)