aboutsummaryrefslogtreecommitdiffstats
path: root/src/wayland-util.c
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2012-06-12 23:57:32 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-06-12 20:18:38 -0400
commitf36f32a0e05b4af290862b9d0ec685f6d095786f (patch)
tree33002c9b8096471a7d86640153f13d0f080c8805 /src/wayland-util.c
parentwayland-cursor: add an option that changes the cursor theme directory (diff)
downloadwayland-f36f32a0e05b4af290862b9d0ec685f6d095786f.tar
wayland-f36f32a0e05b4af290862b9d0ec685f6d095786f.tar.gz
wayland-f36f32a0e05b4af290862b9d0ec685f6d095786f.tar.bz2
wayland-f36f32a0e05b4af290862b9d0ec685f6d095786f.tar.lz
wayland-f36f32a0e05b4af290862b9d0ec685f6d095786f.tar.xz
wayland-f36f32a0e05b4af290862b9d0ec685f6d095786f.tar.zst
wayland-f36f32a0e05b4af290862b9d0ec685f6d095786f.zip
wayland-util: wl_list_insert_list() should accept empty lists
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Diffstat (limited to 'src/wayland-util.c')
-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;