Warning: crashes! Confirmation dialog will also show estimated cost

This commit is contained in:
Sergii Pylypenko
2016-05-16 22:15:41 +03:00
parent f7b1a0abd3
commit 96501e9f08
5 changed files with 75 additions and 16 deletions

View File

@@ -3151,7 +3151,7 @@ EventState VpHandlePlaceSizingDrag()
return ES_HANDLED;
}
ShowBuildConfirmationWindow(); // This will also remember tile selection, so it's okay for the4 code below
ShowBuildConfirmationWindow(); // This will also remember tile selection, so it's okay for the code below to change selection
/* mouse button released..
* keep the selected tool, but reset it to the original mode. */
@@ -3177,7 +3177,10 @@ place_mouseup:
void ConfirmPlacingObject()
{
Window *w = _thd.GetCallbackWnd();
if (w == NULL) ResetObjectToPlace();
if (w == NULL) {
ResetObjectToPlace();
return;
}
w->OnPlaceMouseUp(_thd.select_method, _thd.select_proc, _thd.selend, TileVirtXY(_thd.selstart.x, _thd.selstart.y), TileVirtXY(_thd.selend.x, _thd.selend.y));
}