Fix assertion when plugins draw custom images

This commit is contained in:
ζeh Matt committed 2025-04-25 17:48:38 +03:00
1 parent e9ee54b716
commit e991cfb97e
1 file changed
+4
@@ -452,8 +452,12 @@ namespace OpenRCT2::Scripting
dpi.bits = new uint8_t[bufferSize];
std::memset(dpi.bits, 0, bufferSize);
drawingEngine->BeginDraw();
// Draw the original image if we are creating a new one
GfxDrawSprite(dpi, ImageId(id), { 0, 0 });
drawingEngine->EndDraw();
}
else
{