From 81198f091c4f08be313840ee9699576e672656eb Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Fri, 24 Nov 2023 20:34:41 +1100 Subject: [PATCH] fix Image not resetting properly after being moved from --- source/core/StarImage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/StarImage.cpp b/source/core/StarImage.cpp index 33c37a4..ac1fb9a 100644 --- a/source/core/StarImage.cpp +++ b/source/core/StarImage.cpp @@ -244,7 +244,7 @@ void Image::reset(unsigned width, unsigned height, Maybe 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);