(svn r26122) -Fix-ish: remove essentially dead code; if nested_array were NULL there, it would segfault in RaiseWidget

pull/155/head
rubidium 11 years ago
parent 519cb3e103
commit 115877a111

@ -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…
Cancel
Save