Merge branch 'staging/pr-497-1.12' into 1.12
This commit is contained in:
commit
229126d638
2 changed files with 8 additions and 0 deletions
|
@ -58,6 +58,7 @@ Version 1.12.4+dev:
|
|||
* Fixed hang when attempting to make a screenshot from a non-existent map via
|
||||
command-line (bug #20900)
|
||||
* Fixed cases of wrong unit type used in planning moves (bug #20299)
|
||||
* Avoid crash when planning moves on planned recruits (bug #18637)
|
||||
|
||||
Version 1.12.4:
|
||||
* Security fixes:
|
||||
|
|
|
@ -138,6 +138,13 @@ move::move(config const& cfg, bool hidden)
|
|||
|
||||
void move::init()
|
||||
{
|
||||
// If a unit is invalid, return immediately to avoid crashes such as trying to plan a move for a planned recruit.
|
||||
// As per Bug #18637, this should be fixed so that planning moves on planned recruits work properly.
|
||||
// The alternative is to disable movement on planned recruits altogether,
|
||||
// possibly in select_or_action() where the fake unit is selected in the first place.
|
||||
if (get_unit() == NULL)
|
||||
return;
|
||||
|
||||
assert(get_unit());
|
||||
unit_id_ = get_unit()->id();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue