--- xsltproc_org.c	2015-11-05 10:16:57.829766992 +0530
+++ xsltproc.c	2015-11-05 10:26:04.041781014 +0530
@@ -138,7 +138,7 @@
 static xmlParserInputPtr
 xsltprocExternalEntityLoader(const char *URL, const char *ID,
 			     xmlParserCtxtPtr ctxt) {
-    xmlParserInputPtr ret;
+    xmlParserInputPtr ret =  NULL;
     warningSAXFunc warning = NULL;
 
     int i;
@@ -180,7 +180,8 @@
 	newURL = xmlStrcat(newURL, (const xmlChar *) "/");
 	newURL = xmlStrcat(newURL, (const xmlChar *) lastsegment);
 	if (newURL != NULL) {
-	    ret = defaultEntityLoader((const char *)newURL, ID, ctxt);
+	    if (defaultEntityLoader != NULL)
+	        ret = defaultEntityLoader((const char *)newURL, ID, ctxt);
 	    if (ret != NULL) {
 		if (warning != NULL)
 		    ctxt->sax->warning = warning;
