libidav/webdav.c

changeset 128
649eb328674a
parent 75
56962faf2b42
child 134
4bccc18820e8
--- a/libidav/webdav.c	Tue Jun 02 10:07:20 2015 +0200
+++ b/libidav/webdav.c	Tue Jun 02 20:57:23 2015 +0200
@@ -220,8 +220,13 @@
         DavNamespace *ns = dav_get_namespace_s(
                 ctx,
                 sstrn(prefixed_name, pname-prefixed_name));
-        pns = ns->name;
-        pname++;
+        if(ns) {
+            pns = ns->name;
+            pname++;
+        } else {
+            pns = NULL;
+            pname = NULL;
+        }
     } else {
         pname = prefixed_name;
     }
@@ -304,7 +309,7 @@
     return error;
 }
 
-UcxList* propfind_stack_push(UcxList *stack, DavResource *children) {
+static UcxList* propfind_stack_push(UcxList *stack, DavResource *children) {
     while(children) {
         if(children->iscollection) {
             stack = ucx_list_prepend(stack, children);

mercurial