commit 77fbc3ea90852f746710858d6e8c25ac3852b2e1 Author: Daniel Veillard <veillard@src.gnome.org> Date: Mon Mar 24 14:06:19 2008 +0000 fix an XML Schemas crash raised by Stefan Behnel when testing with W3C * xmlschemas.c: fix an XML Schemas crash raised by Stefan Behnel when testing with W3C test suite Daniel svn path=/trunk/; revision=3712 diff --git a/xmlschemas.c b/xmlschemas.c index 13c22ca..01a9c3c 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -21808,9 +21808,9 @@ xmlSchemaValidateNotation(xmlSchemaValidCtxtPtr vctxt, return (1); } if (xmlSchemaGetNotation(schema, localName, nsName) != NULL) { - if (valNeeded && (val != NULL)) { - (*val) = xmlSchemaNewNOTATIONValue(BAD_CAST localName, - BAD_CAST xmlStrdup(nsName)); + if ((valNeeded) && (val != NULL)) { + (*val) = xmlSchemaNewNOTATIONValue(xmlStrdup(localName), + xmlStrdup(nsName)); if (*val == NULL) ret = -1; }