summaryrefslogtreecommitdiff
path: root/src/guichan/focushandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guichan/focushandler.cpp')
-rw-r--r--src/guichan/focushandler.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/guichan/focushandler.cpp b/src/guichan/focushandler.cpp
index 393c08880..494a2a899 100644
--- a/src/guichan/focushandler.cpp
+++ b/src/guichan/focushandler.cpp
@@ -369,10 +369,9 @@ namespace gcn
if (focusedWidget == focused)
return;
- if (mWidgets.at(focusedWidget)->isFocusable() &&
- mWidgets.at(focusedWidget)->isTabInEnabled() &&
- (!mModalFocusedWidget ||
- mWidgets.at(focusedWidget)->isModalFocused()))
+ const Widget *widget = mWidgets.at(focusedWidget);
+ if (widget->isFocusable() && widget->isTabInEnabled() &&
+ (!mModalFocusedWidget || widget->isModalFocused()))
{
done = true;
}
@@ -438,10 +437,9 @@ namespace gcn
if (focusedWidget == focused)
return;
- if (mWidgets.at(focusedWidget)->isFocusable() &&
- mWidgets.at(focusedWidget)->isTabInEnabled() &&
- (!mModalFocusedWidget ||
- mWidgets.at(focusedWidget)->isModalFocused()))
+ const Widget *widget = mWidgets.at(focusedWidget);
+ if (widget->isFocusable() && widget->isTabInEnabled() &&
+ (!mModalFocusedWidget || widget->isModalFocused()))
{
done = true;
}