From 9cfa1faf5e48155690ca1fa48ea546b84bb9b8ef Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Sat, 30 Jul 2005 21:49:23 +0000 Subject: [PATCH] Fixed an error where Cantera would seg fault if errors in the XML file occurred. --- Cantera/src/ctml.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Cantera/src/ctml.cpp b/Cantera/src/ctml.cpp index f5fbc3c78..e7b746001 100755 --- a/Cantera/src/ctml.cpp +++ b/Cantera/src/ctml.cpp @@ -115,6 +115,7 @@ namespace ctml { XML_Node* getByTitle(XML_Node& node, string title) { XML_Node* s = node.findByAttr("title",title); + if (!s) return 0; if (s->parent() == &node) return s; else return 0; }