diff --git a/src/wayland-util.c b/src/wayland-util.c index d5973bf..47d0bae 100644 --- a/src/wayland-util.c +++ b/src/wayland-util.c @@ -147,7 +147,9 @@ wl_array_copy(struct wl_array *array, struct wl_array *source) array->size = source->size; } - memcpy(array->data, source->data, source->size); + if (source->size > 0) + memcpy(array->data, source->data, source->size); + return 0; }