(svn r20812) -Fix [FS#4125]: crash when confirming newgrf changes with the newgrf parameter window open

This commit is contained in:
yexo
2010-09-15 22:46:18 +00:00
parent bd036265cc
commit 7e683e1da6

View File

@@ -1590,6 +1590,7 @@ static const WindowDesc _newgrf_desc(
static void NewGRFConfirmationCallback(Window *w, bool confirmed) static void NewGRFConfirmationCallback(Window *w, bool confirmed)
{ {
if (confirmed) { if (confirmed) {
DeleteWindowByClass(WC_GRF_PARAMETERS);
NewGRFWindow *nw = dynamic_cast<NewGRFWindow*>(w); NewGRFWindow *nw = dynamic_cast<NewGRFWindow*>(w);
GamelogStartAction(GLAT_GRF); GamelogStartAction(GLAT_GRF);