]> granicus.if.org Git - php/commitdiff
Fix segfault on error in xslt
authorChristian Stocker <chregu@php.net>
Tue, 10 Aug 2004 08:00:06 +0000 (08:00 +0000)
committerChristian Stocker <chregu@php.net>
Tue, 10 Aug 2004 08:00:06 +0000 (08:00 +0000)
ext/xsl/xsltprocessor.c

index 58ce3c324005985ef5e0bd2789430fd1712f9b00..1ed075a3706468ad247c11058c292b4c71f7b665 100644 (file)
@@ -400,7 +400,10 @@ static xmlDocPtr php_xsl_apply_stylesheet(xsl_object *intern, xsltStylesheetPtr
        char **params = NULL;
        int clone;
 
-
+       if (style == NULL) {
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "No stylesheet associated to this object");
+               return NULL;
+       }
        if (intern->parameter) {
                params = php_xsl_xslt_make_params(intern->parameter, 0 TSRMLS_CC);
        }