(svn r22135) -Fix [FS#4523]: When commands need to invalidate windows, process these events asynchronously before the next redraw. Calling window code directly from command scope uses wrong _current_company and might issue nested DoCommands() which interfer with the running command.
This commit is contained in:
@@ -199,6 +199,7 @@ public:
|
||||
if (c != NULL) {
|
||||
Money old_money = c->money;
|
||||
c->money = INT64_MAX;
|
||||
assert(_current_company == _local_company);
|
||||
CommandCost costclear = DoCommand(tile, 0, 0, DC_NONE, CMD_LANDSCAPE_CLEAR);
|
||||
c->money = old_money;
|
||||
if (costclear.Succeeded()) {
|
||||
|
Reference in New Issue
Block a user