(svn r6614) -Fix: added check to see if a newly opened refit window is different from NULL before assigning data to it

This commit is contained in:
bjarni
2006-10-02 08:41:20 +00:00
parent caab23ba12
commit b20a23d25d

View File

@@ -432,7 +432,10 @@ void ShowVehicleRefitWindow(const Vehicle *v)
DeleteWindowById(WC_VEHICLE_REFIT, v->index);
_alloc_wnd_parent_num = v->index;
w = AllocateWindowDesc(&_vehicle_refit_desc);
if (w != NULL) {
w->window_number = v->index;
w->caption_color = v->owner;
w->vscroll.cap = 8;
@@ -462,6 +465,7 @@ void ShowVehicleRefitWindow(const Vehicle *v)
default: NOT_REACHED();
}
}
}
/* Display additional text from NewGRF in the purchase information window */
int ShowAdditionalText(int x, int y, int w, EngineID engine)