summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-11-29 09:18:49 +0000
committeralberth <alberth@openttd.org>2009-11-29 09:18:49 +0000
commit45327a588be1154a25b35d1c8b94d05768890b76 (patch)
treea58a1d3504dc92aaa9705dcfe001ebb84deafe72 /src
parentc0dfaec34d7b2387553de197081c3d84b4b3a823 (diff)
downloadopenttd-45327a588be1154a25b35d1c8b94d05768890b76.tar.xz
(svn r18334) -Codechange: No need to test a pointer after using it.
Diffstat (limited to 'src')
-rw-r--r--src/window.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 5fe73b7e5..deed06c70 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -257,8 +257,7 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, bool double_click)
* So unless the clicked widget is the caption bar, change focus to this widget */
if (widget_type != WWT_CAPTION) {
/* Close the OSK window if a edit box loses focus */
- if ((w->nested_root != NULL && w->nested_focus != NULL && w->nested_focus->type == WWT_EDITBOX &&
- w->nested_focus != nw && w->window_class != WC_OSK)) {
+ if (w->nested_focus != NULL && w->nested_focus->type == WWT_EDITBOX && w->nested_focus != nw && w->window_class != WC_OSK) {
DeleteWindowById(WC_OSK, 0);
}