From 226a9978640463b41730b1f4979d60da67b9397c Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Sun, 27 Sep 2009 00:43:11 +0200 Subject: Make eurephiaXML_ParserResultMsg() return NULL if input XML document pointer is NULL --- common/eurephia_xml.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/eurephia_xml.c b/common/eurephia_xml.c index 6fa1ee1..d47ef85 100644 --- a/common/eurephia_xml.c +++ b/common/eurephia_xml.c @@ -272,7 +272,10 @@ eurephiaRESULT *eurephiaXML_ParseResultMsg(eurephiaCTX *ctx, xmlDoc *resxml) { xmlNode *res_n = NULL; char *str = NULL; - assert( (ctx != NULL) && (resxml != NULL) ); + assert( ctx != NULL ); + if( resxml == NULL ) { + return NULL; + } res_n = eurephiaXML_getRoot(ctx, resxml, "Result", 1); if( res_n == NULL) { -- cgit