make sure stylesheet compilation errors forces a NULL stylesheet, fixes
authorDaniel Veillard <veillard@src.gnome.org>
Sat, 10 May 2003 17:06:57 +0000 (17:06 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Sat, 10 May 2003 17:06:57 +0000 (17:06 +0000)
* libxslt/xslt.c: make sure stylesheet compilation errors
  forces a NULL stylesheet, fixes #112270
Daniel

ChangeLog
libxslt/xslt.c

index da84569..0638332 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat May 10 13:05:21 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+       * libxslt/xslt.c: make sure stylesheet compilation errors
+         forces a NULL stylesheet, fixes #112270
+
 Sun May  4 17:41:23 CEST 2003 Daniel Veillard <daniel@veillard.com>
 
        * NEWS configure.in : preparing release 1.0.30
index 774cc86..2750921 100644 (file)
@@ -1983,6 +1983,11 @@ xsltParseStylesheetImportedDoc(xmlDocPtr doc) {
        xsltFreeStylesheet(ret);
        ret = NULL;
     }
+    if (ret->errors != 0) {
+       ret->doc = NULL;
+       xsltFreeStylesheet(ret);
+       ret = NULL;
+    }
 
     return(ret);
 }