From 79ccf48636c5290b453dccc9bfec660b9ba073ef Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 26 Nov 2013 13:23:31 +0000 Subject: (svn r26122) -Fix-ish: remove essentially dead code; if nested_array were NULL there, it would segfault in RaiseWidget --- src/window.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index 81738aec3..e21edfc73 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -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(widget); - if ((nwi2->type & WWT_MASK) == NWID_BUTTON_DROPDOWN) { - nwi2->disp_flags &= ~ND_DROPDOWN_ACTIVE; - } else { - this->RaiseWidget(widget); - } + NWidgetCore *nwi2 = this->GetWidget(widget); + if ((nwi2->type & WWT_MASK) == NWID_BUTTON_DROPDOWN) { + nwi2->disp_flags &= ~ND_DROPDOWN_ACTIVE; } else { this->RaiseWidget(widget); } -- cgit v1.2.3-70-g09d2