libidav/methods.c

changeset 97
5a3d27b8e6b0
parent 87
5360027fb282
--- a/libidav/methods.c	Wed Nov 27 18:53:11 2024 +0100
+++ b/libidav/methods.c	Thu Nov 28 18:03:12 2024 +0100
@@ -836,7 +836,7 @@
     {
         char prefix[8];
         int pfxnum = 0;
-        if (data->set) {
+        if (data->set && cxListSize(data->set) > 0) {
             CxIterator i = cxListIterator(data->set);
             cx_foreach(DavProperty*, p, i) {
                 if (strcmp(p->ns->name, "DAV:")) {
@@ -845,7 +845,7 @@
                 }
             }
         }
-        if (data->remove) {
+        if (data->remove && cxListSize(data->remove) > 0) {
             CxIterator i = cxListIterator(data->remove);
             cx_foreach(DavProperty*, p, i) {
                 if (strcmp(p->ns->name, "DAV:")) {

mercurial