fix Image not resetting properly after being moved from

This commit is contained in:
Kae 2023-11-24 20:34:41 +11:00
parent eb4652b5f6
commit 81198f091c

View File

@ -244,7 +244,7 @@ void Image::reset(unsigned width, unsigned height, Maybe<PixelFormat> pf) {
if (!pf)
pf = m_pixelFormat;
if (m_width == width && m_height == height && m_pixelFormat == *pf)
if (m_data && m_width == width && m_height == height && m_pixelFormat == *pf)
return;
size_t imageSize = width * height * Star::bytesPerPixel(*pf);