mirror of https://github.com/OpenTTD/OpenTTD
(svn r6614) -Fix: added check to see if a newly opened refit window is different from NULL before assigning data to it
parent
bc96ad5f76
commit
94c3963841
|
@ -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;
|
||||
|
@ -461,6 +464,7 @@ void ShowVehicleRefitWindow(const Vehicle *v)
|
|||
break;
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Display additional text from NewGRF in the purchase information window */
|
||||
|
|
Loading…
Reference in New Issue