changeset 17830:45d44aa92d1c draft

(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.
author frosch <frosch@openttd.org>
date Sat, 02 Jul 2011 17:40:39 +0000
parents 3c9a83a23782
children 7c8f4c06bbc1
files src/misc_cmd.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/misc_cmd.cpp
+++ b/src/misc_cmd.cpp
@@ -125,7 +125,9 @@
  */
 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);
+	}
 }
 
 /**