summaryrefslogtreecommitdiffstats
path: root/gxpd.c
diff options
context:
space:
mode:
authorNathan Straz <nstraz@redhat.com>2008-09-23 16:09:59 -0400
committerNathan Straz <nstraz@redhat.com>2008-09-23 16:09:59 -0400
commita37dda7297ac4d3c099d279551ae46cd1e8c5e27 (patch)
tree4084575e822dfd16b22f0c41da1b5378b40471f8 /gxpd.c
parentf9a50575b7c5db0afbcf14558bcecde1151450dc (diff)
downloadgxpp-a37dda7297ac4d3c099d279551ae46cd1e8c5e27.zip
gxpp-a37dda7297ac4d3c099d279551ae46cd1e8c5e27.tar.gz
gxpp-a37dda7297ac4d3c099d279551ae46cd1e8c5e27.tar.xz
There is a possibility that nodesetval is NULL even if the type is set.
Diffstat (limited to 'gxpd.c')
-rw-r--r--gxpd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gxpd.c b/gxpd.c
index 6c569b4..70cd2bf 100644
--- a/gxpd.c
+++ b/gxpd.c
@@ -100,7 +100,7 @@ gxpd(char *fn, const char *xpath_query, const char *prefix)
xpath_query, fn);
exit(1);
}
- if (obj->type != XPATH_NODESET) {
+ if (obj->type != XPATH_NODESET || obj->nodesetval == NULL) {
fprintf(stderr, "XPath expression '%s' did not match a nodeset.\n", xpath_query);
exit(1);
}