mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-28 08:59:09 +00:00
(svn r18334) -Codechange: No need to test a pointer after using it.
This commit is contained in:
@@ -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 */
|
* So unless the clicked widget is the caption bar, change focus to this widget */
|
||||||
if (widget_type != WWT_CAPTION) {
|
if (widget_type != WWT_CAPTION) {
|
||||||
/* Close the OSK window if a edit box loses focus */
|
/* 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 &&
|
if (w->nested_focus != NULL && w->nested_focus->type == WWT_EDITBOX && w->nested_focus != nw && w->window_class != WC_OSK) {
|
||||||
w->nested_focus != nw && w->window_class != WC_OSK)) {
|
|
||||||
DeleteWindowById(WC_OSK, 0);
|
DeleteWindowById(WC_OSK, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user