mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Fixes map editor crash on changing terrain of invalid tiles
This commit is contained in:
@@ -461,11 +461,9 @@ void SelectionTerrainLayer::select(const std::vector<int3> & tiles)
|
|||||||
{
|
{
|
||||||
for (int3 tile : tiles)
|
for (int3 tile : tiles)
|
||||||
{
|
{
|
||||||
if(!area.count(tile))
|
if(!area.count(tile) && map->isInTheMap(tile))
|
||||||
{
|
|
||||||
area.insert(tile);
|
area.insert(tile);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
redraw(tiles);
|
redraw(tiles);
|
||||||
onSelection();
|
onSelection();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user