mirror of https://github.com/OpenRCT2/OpenRCT2.git
Zero g1 elements when freeing images
This is to help diagnose issues where we are drawing invalid sprites as well as general cleanliness
This commit is contained in:
parent
83fa818190
commit
964cf66f6b
|
@ -145,6 +145,15 @@ extern "C"
|
|||
{
|
||||
if (baseImageId != 0)
|
||||
{
|
||||
// Zero the G1 elements so we don't have invalid pointers
|
||||
// and data lying about
|
||||
for (uint32 i = 0; i < count; i++)
|
||||
{
|
||||
uint32 imageId = baseImageId + i;
|
||||
g1Elements[imageId] = { 0 };
|
||||
drawing_engine_invalidate_image(imageId);
|
||||
}
|
||||
|
||||
FreeImageList(baseImageId, count);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue