From 2580cc24d94128c0ea9d0e3137e9e2e83c72218b Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Sat, 26 Sep 2009 00:18:00 +0200 Subject: Don't assert() if the input XML doc to eurephiaXML_IsResult() is NULL. --- common/eurephia_xml.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/eurephia_xml.c b/common/eurephia_xml.c index b166cb8..6fa1ee1 100644 --- a/common/eurephia_xml.c +++ b/common/eurephia_xml.c @@ -246,7 +246,10 @@ xmlNode *eurephiaXML_getRoot(eurephiaCTX *ctx, xmlDoc *doc, const char *nodeset, unsigned int eurephiaXML_IsResultMsg(eurephiaCTX *ctx, xmlDoc *resxml) { xmlNode *node = NULL; - assert( (ctx != NULL) && (resxml != NULL) ); + assert( ctx != NULL ); + if( resxml == NULL ) { + return 0; + } node = eurephiaXML_getRoot(ctx, resxml, "Result", 1); return (node != NULL ? 1 : 0); } -- cgit