1
0
Fork 0

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

release/0.5
bjarni 2006-10-02 08:41:20 +00:00
parent bc96ad5f76
commit 94c3963841
1 changed files with 31 additions and 27 deletions

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;
@ -461,6 +464,7 @@ void ShowVehicleRefitWindow(const Vehicle *v)
break;
default: NOT_REACHED();
}
}
}
/* Display additional text from NewGRF in the purchase information window */