diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-03-01 22:51:30 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-03-01 22:51:30 +0800 |
commit | c188dd53cc7ee893f271384bb3928fe9c45f97a5 (patch) | |
tree | ea68cc4f7a0e92b50a993c762adb5a298b58b763 /lib | |
parent | 2737b39233fc4cf0cfa332a233371e3344f6c99c (diff) | |
download | gsoc2013-epiphany-c188dd53cc7ee893f271384bb3928fe9c45f97a5.tar gsoc2013-epiphany-c188dd53cc7ee893f271384bb3928fe9c45f97a5.tar.gz gsoc2013-epiphany-c188dd53cc7ee893f271384bb3928fe9c45f97a5.tar.bz2 gsoc2013-epiphany-c188dd53cc7ee893f271384bb3928fe9c45f97a5.tar.lz gsoc2013-epiphany-c188dd53cc7ee893f271384bb3928fe9c45f97a5.tar.xz gsoc2013-epiphany-c188dd53cc7ee893f271384bb3928fe9c45f97a5.tar.zst gsoc2013-epiphany-c188dd53cc7ee893f271384bb3928fe9c45f97a5.zip |
Guard against xml reading error, check for NULL subtree before trying to
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ephy-node-db.c | 8 |
1 files changed, 5 insertions, 3 deletions
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) |