mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix assertion when plugins draw custom images
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user