(svn r22621) -Fix: When asking the user to confirm an unsafe unpausing, there is no need to execute a command if 'no' is choosed. This also prevents crashing when clicking unpause while the confirm window is shown.

This commit is contained in:
frosch 2011-07-02 17:40:39 +00:00
parent 55a21a940d
commit 7bf8b1d96e
1 changed files with 3 additions and 1 deletions

View File

@ -125,7 +125,9 @@ CommandCost CmdDecreaseLoan(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
*/
static void AskUnsafeUnpauseCallback(Window *w, bool confirmed)
{
DoCommandP(0, PM_PAUSED_ERROR, confirmed ? 0 : 1, CMD_PAUSE);
if (confirmed) {
DoCommandP(0, PM_PAUSED_ERROR, 0, CMD_PAUSE);
}
}
/**