diff --git a/WINGs/data.c b/WINGs/data.c index eb9227bf..510e56e7 100644 --- a/WINGs/data.c +++ b/WINGs/data.c @@ -71,7 +71,8 @@ WMData *WMCreateDataWithBytes(const void *bytes, unsigned length) aData = WMCreateDataWithCapacity(length); aData->length = length; - memcpy(aData->bytes, bytes, length); + if (length > 0) + memcpy(aData->bytes, bytes, length); return aData; }