summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include/dlinklist.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/include/dlinklist.h')
-rw-r--r--source4/lib/ldb/include/dlinklist.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/ldb/include/dlinklist.h b/source4/lib/ldb/include/dlinklist.h
index 40f7f0a0c7..a39007375f 100644
--- a/source4/lib/ldb/include/dlinklist.h
+++ b/source4/lib/ldb/include/dlinklist.h
@@ -88,6 +88,8 @@ do { \
type tmp; \
for (tmp = (list1); tmp->next; tmp = tmp->next) ; \
tmp->next = (list2); \
- (list2)->prev = tmp; \
+ if (list2) { \
+ (list2)->prev = tmp; \
+ } \
} \
} while (0)