fixed 2 bugs pointed in #116448 Daniel

* debugXML.c xpath.c: fixed 2 bugs pointed in #116448
Daniel
diff --git a/xpath.c b/xpath.c
index e6e3e1e..92d68de 100644
--- a/xpath.c
+++ b/xpath.c
@@ -5942,6 +5942,8 @@
     xmlAttrPtr attr;
     xmlNodePtr elem = NULL;
 
+    if (ids == NULL) return(NULL);
+
     ret = xmlXPathNodeSetCreate(NULL);
 
     while (IS_BLANK(*cur)) cur++;