Shot-in-the-dark fix for bug #18525 (whiteboard recruit crash).

This commit is contained in:
Tommy Schmitz 2011-08-20 20:39:20 +00:00
parent 6c21d06c48
commit 13e8912a8f

View File

@ -213,6 +213,8 @@ void mouse_handler::mouse_motion(int x, int y, const bool browse, bool update, m
gui().clear_attack_indicator();
}
unit* un; //will later point to unit at mouseover_hex_
// the destination is the pointed hex or the adjacent hex
// used to attack it
map_location dest;
@ -248,11 +250,7 @@ void mouse_handler::mouse_motion(int x, int y, const bool browse, bool update, m
}
}
}
} // end planned unit map scope
unit* un;
{ // start planned unit map scope
wb::scoped_planned_unit_map planned_unit_map;
unit_map::iterator iter = mouseover_unit;
if (iter != units_.end())
un = &*iter;