From: William M. Brack Date: Wed, 16 Mar 2005 11:12:38 +0000 (+0000) Subject: fixed problem with text node on stylesheet document without a dictionary X-Git-Tag: v1.1.28~320 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=34b78d1384cfe14eb0d21150b79307f51910adfa;p=platform%2Fupstream%2Flibxslt.git fixed problem with text node on stylesheet document without a dictionary * libxslt/xslt.c: fixed problem with text node on stylesheet document without a dictionary (bug 170533) --- diff --git a/ChangeLog b/ChangeLog index 63b86fa..c5708d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Mar 16 17:19:24 HKT 2005 William Brack (wbrack@mmm.com.hk) + + * libxslt/xslt.c: fixed problem with text node on stylesheet + document without a dictionary (bug 170533) + Sun Mar 13 20:08:34 CET 2005 Daniel Veillard * NEWS configure.in doc/*: preparing 1.1.13, updated and rebuilt diff --git a/libxslt/xslt.c b/libxslt/xslt.c index 30018d2..cae7a18 100644 --- a/libxslt/xslt.c +++ b/libxslt/xslt.c @@ -1534,14 +1534,17 @@ xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ) { while (text != NULL) { if ((text->content != NULL) && (!xmlDictOwns(style->dict, text->content))) { - xmlChar *old = (xmlChar *) text->content; /* * internalize the text string */ - text->content = (xmlChar *) - xmlDictLookup(style->dict, old, -1); - xmlFree(old); + if (text->doc->dict != NULL) { + xmlChar *old = (xmlChar *) text->content; + text->content = + (xmlChar *) xmlDictLookup( + text->doc->dict, old, -1); + xmlFree(old); + } } next = text->next;