1
0
Fork 0

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

release/1.4
rubidium 2013-11-26 13:23:31 +00:00
parent 50fdf5e30c
commit 79ccf48636
1 changed files with 3 additions and 7 deletions

View File

@ -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);
}