--- preproc.c_org	2015-11-04 16:08:00.276089745 +0530
+++ preproc.c	2016-01-05 11:11:15.665144413 +0530
@@ -1413,8 +1413,6 @@
 	return;
     cur->psvi = comp;
 
-    if ((style == NULL) || (cur == NULL))
-	return;
 
     comp->numdata.doc = cur->doc;
     comp->numdata.node = cur;
@@ -1456,7 +1454,7 @@
 	} else {
 	    xsltTransformError(NULL, style, cur,
 			 "xsl:number : invalid value %s for level\n", prop);
-	    if (style != NULL) style->warnings++;
+	    style->warnings++;
 	}
     }
 
@@ -1472,17 +1470,17 @@
 	if (xmlStrEqual(prop, BAD_CAST("alphabetic"))) {
 	    xsltTransformError(NULL, style, cur,
 		 "xsl:number : letter-value 'alphabetic' not implemented\n");
-	    if (style != NULL) style->warnings++;
+	    style->warnings++;
 	    XSLT_TODO; /* xsl:number letter-value attribute alphabetic */
 	} else if (xmlStrEqual(prop, BAD_CAST("traditional"))) {
 	    xsltTransformError(NULL, style, cur,
 		 "xsl:number : letter-value 'traditional' not implemented\n");
-	    if (style != NULL) style->warnings++;
+	    style->warnings++;
 	    XSLT_TODO; /* xsl:number letter-value attribute traditional */
 	} else {
 	    xsltTransformError(NULL, style, cur,
 		     "xsl:number : invalid value %s for letter-value\n", prop);
-	    if (style != NULL) style->warnings++;
+	    style->warnings++;
 	}
     }
 
@@ -1697,7 +1695,7 @@
     if (comp->test == NULL) {
 	xsltTransformError(NULL, style, inst,
 	     "xsl:if : test is not defined\n");
-	if (style != NULL) style->errors++;
+	style->errors++;
 	return;
     }
     comp->comp = xsltXPathCompile(style, comp->test);
@@ -1705,7 +1703,7 @@
 	xsltTransformError(NULL, style, inst,
 	     "xsl:if : could not compile test expression '%s'\n",
 	                 comp->test);
-	if (style != NULL) style->errors++;
+	style->errors++;
     }
 }
 
@@ -1743,7 +1741,7 @@
     if (comp->test == NULL) {
 	xsltTransformError(NULL, style, inst,
 	     "xsl:when : test is not defined\n");
-	if (style != NULL) style->errors++;
+	style->errors++;
 	return;
     }
     comp->comp = xsltXPathCompile(style, comp->test);
@@ -1751,7 +1749,7 @@
 	xsltTransformError(NULL, style, inst,
 	     "xsl:when : could not compile test expression '%s'\n",
 	                 comp->test);
-	if (style != NULL) style->errors++;
+	style->errors++;
     }
 }
 
@@ -1790,14 +1788,14 @@
     if (comp->select == NULL) {
 	xsltTransformError(NULL, style, inst,
 		"xsl:for-each : select is missing\n");
-	if (style != NULL) style->errors++;
+	style->errors++;
     } else {
 	comp->comp = xsltXPathCompile(style, comp->select);
 	if (comp->comp == NULL) {
 	    xsltTransformError(NULL, style, inst,
      "xsl:for-each : could not compile select expression '%s'\n",
 			     comp->select);
-	    if (style != NULL) style->errors++;
+	    style->errors++;
 	}
     }
     /* TODO: handle and skip the xsl:sort */
