summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wayland-util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wayland-util.c b/src/wayland-util.c
index eac7801..107b6db 100644
--- a/src/wayland-util.c
+++ b/src/wayland-util.c
@@ -79,6 +79,9 @@ wl_list_empty(struct wl_list *list)
WL_EXPORT void
wl_list_insert_list(struct wl_list *list, struct wl_list *other)
{
+ if (wl_list_empty(other))
+ return;
+
other->next->prev = list;
other->prev->next = list->next;
list->next->prev = other->prev;