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:
parent
48f130cd76
commit
0c9e2d6fdd
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user