summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2009-09-26 00:18:00 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2009-09-26 00:18:00 +0200
commit2580cc24d94128c0ea9d0e3137e9e2e83c72218b (patch)
tree60854c1a5082a81cd9a130b08c022d58991418c6 /common
parent80ac48189fea2cdb791ff1fb1fcfa5a08294f518 (diff)
downloadeurephia-2580cc24d94128c0ea9d0e3137e9e2e83c72218b.tar.gz
eurephia-2580cc24d94128c0ea9d0e3137e9e2e83c72218b.tar.xz
eurephia-2580cc24d94128c0ea9d0e3137e9e2e83c72218b.zip
Don't assert() if the input XML doc to eurephiaXML_IsResult() is NULL.
Diffstat (limited to 'common')
-rw-r--r--common/eurephia_xml.c5
1 files changed, 4 insertions, 1 deletions
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);
}