(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);
|
DeleteWindowById(WC_VEHICLE_REFIT, v->index);
|
||||||
|
|
||||||
_alloc_wnd_parent_num = v->index;
|
_alloc_wnd_parent_num = v->index;
|
||||||
|
|
||||||
w = AllocateWindowDesc(&_vehicle_refit_desc);
|
w = AllocateWindowDesc(&_vehicle_refit_desc);
|
||||||
|
|
||||||
|
if (w != NULL) {
|
||||||
w->window_number = v->index;
|
w->window_number = v->index;
|
||||||
w->caption_color = v->owner;
|
w->caption_color = v->owner;
|
||||||
w->vscroll.cap = 8;
|
w->vscroll.cap = 8;
|
||||||
@@ -461,6 +464,7 @@ void ShowVehicleRefitWindow(const Vehicle *v)
|
|||||||
break;
|
break;
|
||||||
default: NOT_REACHED();
|
default: NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Display additional text from NewGRF in the purchase information window */
|
/* Display additional text from NewGRF in the purchase information window */
|
||||||
|
|||||||
Reference in New Issue
Block a user