fix segfault on area= filter.
areas_ might be empty, so areas_[0] might crash, also returning areas_[0].hexes didn't really make sense in the first place
This commit is contained in:
parent
092f8f325c
commit
41d7df970c
1 changed files with 2 additions and 1 deletions
|
@ -349,7 +349,8 @@ const std::set<map_location>& tod_manager::get_area_by_id(const std::string& id)
|
|||
if (area.id == id)
|
||||
return area.hexes;
|
||||
}
|
||||
return areas_[0].hexes;
|
||||
static const std::set<map_location> res;
|
||||
return res;
|
||||
}
|
||||
|
||||
const std::set<map_location>& tod_manager::get_area_by_index(int index) const
|
||||
|
|
Loading…
Add table
Reference in a new issue