summaryrefslogtreecommitdiff
path: root/xpointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'xpointer.c')
-rw-r--r--xpointer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xpointer.c b/xpointer.c
index 7f014de..add590b 100644
--- a/xpointer.c
+++ b/xpointer.c
@@ -559,7 +559,7 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
return(NULL);
break;
default:
- TODO
+ /* TODO */
return(NULL);
}
@@ -642,7 +642,7 @@ void
xmlXPtrLocationSetAdd(xmlLocationSetPtr cur, xmlXPathObjectPtr val) {
int i;
- if (val == NULL) return;
+ if ((cur == NULL) || (val == NULL)) return;
/*
* check against doublons
@@ -2227,6 +2227,7 @@ xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
xmlNodeSetPtr oldset;
int i;
+ if (ctxt == NULL) return;
CHECK_ARITY(1);
/*
* Save the expression pointer since we will have to evaluate
@@ -2904,6 +2905,8 @@ xmlXPtrEvalRangePredicate(xmlXPathParserContextPtr ctxt) {
xmlLocationSetPtr oldset;
int i;
+ if (ctxt == NULL) return;
+
SKIP_BLANKS;
if (CUR != '[') {
XP_ERROR(XPATH_INVALID_PREDICATE_ERROR);