diff --git a/pcsx2/GS/Renderers/Common/GSDevice.cpp b/pcsx2/GS/Renderers/Common/GSDevice.cpp index 1a58f243e7..a3d81862ec 100644 --- a/pcsx2/GS/Renderers/Common/GSDevice.cpp +++ b/pcsx2/GS/Renderers/Common/GSDevice.cpp @@ -631,14 +631,15 @@ bool GSDevice::ResizeRenderTarget(GSTexture** t, int w, int h, bool preserve_con } const GSTexture::Format fmt = orig_tex ? orig_tex->GetFormat() : GSTexture::Format::Color; - GSTexture* new_tex = FetchSurface(GSTexture::Type::RenderTarget, w, h, 1, fmt, !preserve_contents, true); + const bool really_preserve_contents = (preserve_contents && orig_tex); + GSTexture* new_tex = FetchSurface(GSTexture::Type::RenderTarget, w, h, 1, fmt, !really_preserve_contents, true); if (!new_tex) { Console.WriteLn("%dx%d texture allocation failed in ResizeTexture()", w, h); return false; } - if (preserve_contents && orig_tex) + if (really_preserve_contents) { constexpr GSVector4 sRect = GSVector4::cxpr(0, 0, 1, 1); const GSVector4 dRect = GSVector4(orig_tex->GetRect());