From 19b7249adee1dba623ba4ee69266cd13888deb3d Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 23 Feb 2011 20:54:55 +0000 Subject: (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. --- src/misc_gui.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/misc_gui.cpp') diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 9e770cb41..c86f6c6a3 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -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()) { -- cgit v1.2.3-54-g00ecf