Changeset - r21042:9875f8f32234
[Not reviewed]
master
0 1 0
rubidium - 11 years ago 2013-11-26 13:23:31
rubidium@openttd.org
(svn r26122) -Fix-ish: remove essentially dead code; if nested_array were NULL there, it would segfault in RaiseWidget
1 file changed with 3 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/window.cpp
Show inline comments
 
@@ -268,13 +268,9 @@ void Window::OnDropdownClose(Point pt, i
 
	}
 

	
 
	/* 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);
 
	}
0 comments (0 inline, 0 general)