summaryrefslogtreecommitdiffstats
path: root/gxpd.c
diff options
context:
space:
mode:
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);
}