xml parser BUGFIX dereferencing NULL pointer
diff --git a/src/xml.c b/src/xml.c
index cf2fb40..f019ded 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -62,7 +62,7 @@
                 }
                 return (struct lyxml_ns *)attr;
             }
-        } else if (!strcmp(attr->name, prefix)) {
+        } else if (prefix && !strcmp(attr->name, prefix)) {
             /* prefix found */
             return (struct lyxml_ns *)attr;
         }