mirror of https://github.com/OpenTTD/OpenTTD
(svn r26122) -Fix-ish: remove essentially dead code; if nested_array were NULL there, it would segfault in RaiseWidget
parent
50fdf5e30c
commit
79ccf48636
|
@ -268,13 +268,9 @@ void Window::OnDropdownClose(Point pt, int widget, int index, bool instant_close
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Raise the dropdown button */
|
/* Raise the dropdown button */
|
||||||
if (this->nested_array != NULL) {
|
NWidgetCore *nwi2 = this->GetWidget<NWidgetCore>(widget);
|
||||||
NWidgetCore *nwi2 = this->GetWidget<NWidgetCore>(widget);
|
if ((nwi2->type & WWT_MASK) == NWID_BUTTON_DROPDOWN) {
|
||||||
if ((nwi2->type & WWT_MASK) == NWID_BUTTON_DROPDOWN) {
|
nwi2->disp_flags &= ~ND_DROPDOWN_ACTIVE;
|
||||||
nwi2->disp_flags &= ~ND_DROPDOWN_ACTIVE;
|
|
||||||
} else {
|
|
||||||
this->RaiseWidget(widget);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this->RaiseWidget(widget);
|
this->RaiseWidget(widget);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue