1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-25 21:38:59 +02:00

Fix editor crash

This commit is contained in:
nordsoft 2022-12-04 16:57:46 +04:00
parent 8d1024fcfc
commit 9d054f0bd5

View File

@ -460,8 +460,11 @@ void SelectionObjectsLayer::selectObjects(int x1, int y1, int x2, int y2)
{
for(int i = x1; i < x2; ++i)
{
for(auto & o : handler->getObjects(i, j, scene->level))
selectObject(o.obj, false); //do not inform about each object added
if(map->isInTheMap(int3(i, j, scene->level)))
{
for(auto & o : handler->getObjects(i, j, scene->level))
selectObject(o.obj, false); //do not inform about each object added
}
}
}
onSelection();