Fix 0238a2b5: crash when news message is displayed (#11195)

pull/603/merge
Patric Stout 10 months ago committed by GitHub
parent 40195e689d
commit 9dc2fbe4fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -309,9 +309,9 @@ struct NewsWindow : Window {
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_N_VIEWPORT);
if (nvp != nullptr) {
if (ni->reftype1 == NR_VEHICLE) {
nvp->InitializeViewport(this, GetReferenceTile(ni->reftype1, ni->ref1), ScaleZoomGUI(ZOOM_LVL_NEWS));
} else {
nvp->InitializeViewport(this, static_cast<VehicleID>(ni->ref1), ScaleZoomGUI(ZOOM_LVL_NEWS));
} else {
nvp->InitializeViewport(this, GetReferenceTile(ni->reftype1, ni->ref1), ScaleZoomGUI(ZOOM_LVL_NEWS));
}
if (this->ni->flags & NF_NO_TRANSPARENT) nvp->disp_flags |= ND_NO_TRANSPARENCY;
if ((this->ni->flags & NF_INCOLOUR) == 0) {

Loading…
Cancel
Save