1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Workaround for crash on map rendering

This commit is contained in:
Ivan Savenko 2023-08-06 14:11:31 +03:00
parent 48f130cd76
commit 0c9e2d6fdd

View File

@ -523,6 +523,14 @@ uint8_t MapRendererObjects::checksum(IMapRendererContext & context, const int3 &
for(const auto & objectID : context.getObjects(coordinates))
{
const auto * objectInstance = context.getObject(objectID);
assert(objectInstance);
if(!objectInstance)
{
logGlobal->error("Stray map object that isn't fading");
continue;
}
size_t groupIndex = context.objectGroupIndex(objectInstance->id);
Point offsetPixels = context.objectImageOffset(objectInstance->id, coordinates);