summaryrefslogtreecommitdiff
path: root/libexslt/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexslt/common.c')
-rw-r--r--libexslt/common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libexslt/common.c b/libexslt/common.c
index 86538f02..ffed71b6 100644
--- a/libexslt/common.c
+++ b/libexslt/common.c
@@ -40,7 +40,12 @@ exsltNodeSetFunction (xmlXPathParserContextPtr ctxt, int nargs) {
strval = xmlXPathPopString (ctxt);
retNode = xmlNewDocText (NULL, strval);
ret = xmlXPathNewValueTree (retNode);
- ret->type = XPATH_NODESET;
+ if (ret == NULL) {
+ xsltGenericError(xsltGenericErrorContext,
+ "exsltNodeSetFunction: ret == NULL\n");
+ } else {
+ ret->type = XPATH_NODESET;
+ }
if (strval != NULL)
xmlFree (strval);