garray: Avoid calling memcpy with no items
memcpy(NULL, ., n)
and memcpy(., NULL, n)
are undefined behaviour,
even if n is zero.
When len is 0 here, callers are allowed to pass in null data, and GPtrArray also does not guarantee to have allocated rarray->pdata yet.
Noticed while fixing up !3190 (merged).
/cc @ @3v1n0
Edited by Simon McVittie