diff --git a/xpointer.c b/xpointer.c
index 46f11e8..6c8516f 100644
--- a/xpointer.c
+++ b/xpointer.c
@@ -2461,8 +2461,6 @@ xmlXPtrMatchString(const xmlChar *string, xmlNodePtr start, int startindex,
         ((*end)->type == XML_NAMESPACE_DECL) || (endindex == NULL))
 	return(-1);
     cur = start;
-    if (cur == NULL)
-	return(-1);
     pos = startindex - 1;
     stringlen = xmlStrlen(string);
 
