(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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user