If an image is created with no size, QImage::data() points to nullptr.
We then pass this as an argument to memcpy. It doesn't really matter
because we're copying 0 bytes into it, but it's still thrown as an
runtime error: null pointer passed as argument 1, which is declared to
never be null