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 */
|
||||
if (this->nested_array != NULL) {
|
||||
NWidgetCore *nwi2 = this->GetWidget<NWidgetCore>(widget);
|
||||
if ((nwi2->type & WWT_MASK) == NWID_BUTTON_DROPDOWN) {
|
||||
nwi2->disp_flags &= ~ND_DROPDOWN_ACTIVE;
|
||||
} else {
|
||||
this->RaiseWidget(widget);
|
||||
}
|
||||
NWidgetCore *nwi2 = this->GetWidget<NWidgetCore>(widget);
|
||||
if ((nwi2->type & WWT_MASK) == NWID_BUTTON_DROPDOWN) {
|
||||
nwi2->disp_flags &= ~ND_DROPDOWN_ACTIVE;
|
||||
} else {
|
||||
this->RaiseWidget(widget);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue