Fix improper use of reference and map operator[]
This commit is contained in:
parent
9ac889f6de
commit
3d0d25bb0c
1 changed files with 5 additions and 4 deletions
|
@ -2064,10 +2064,11 @@ void display::draw_hex(const map_location& loc) {
|
|||
}
|
||||
|
||||
// Paint arrows
|
||||
arrows_list_t arrows_in_hex = arrows_map_[loc];
|
||||
foreach(arrow* a, arrows_in_hex)
|
||||
{
|
||||
a->draw_hex(loc);
|
||||
arrows_map_t::const_iterator arrows_in_hex = arrows_map_.find(loc);
|
||||
if(arrows_in_hex != arrows_map_.end()) {
|
||||
foreach(arrow* const a, arrows_in_hex->second) {
|
||||
a->draw_hex(loc);
|
||||
}
|
||||
}
|
||||
|
||||
// Apply shroud, fog and linger overlay
|
||||
|
|
Loading…
Add table
Reference in a new issue