diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2012-06-12 23:57:32 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-06-12 20:18:38 -0400 |
commit | f36f32a0e05b4af290862b9d0ec685f6d095786f (patch) | |
tree | 33002c9b8096471a7d86640153f13d0f080c8805 /src | |
parent | dd8891be36ec208a5e8e5dd32c32426713f16877 (diff) |
wayland-util: wl_list_insert_list() should accept empty lists
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/wayland-util.c | 3 |
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; |