summaryrefslogtreecommitdiff
path: root/src/gui/widgets/widget.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-22 17:35:17 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-22 20:00:36 +0300
commit6fa671cdc65cd3ad507eca7dbee604418e449aa7 (patch)
tree9090841ed74fbb80427310cd96118759267b2941 /src/gui/widgets/widget.cpp
parent1b853996cb2616e181e8822f74d79bd258c97c14 (diff)
downloadmanaplus-6fa671cdc65cd3ad507eca7dbee604418e449aa7.tar.gz
manaplus-6fa671cdc65cd3ad507eca7dbee604418e449aa7.tar.bz2
manaplus-6fa671cdc65cd3ad507eca7dbee604418e449aa7.tar.xz
manaplus-6fa671cdc65cd3ad507eca7dbee604418e449aa7.zip
Fix code style.
Diffstat (limited to 'src/gui/widgets/widget.cpp')
-rw-r--r--src/gui/widgets/widget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/widget.cpp b/src/gui/widgets/widget.cpp
index 70aac5aa2..cbf301b27 100644
--- a/src/gui/widgets/widget.cpp
+++ b/src/gui/widgets/widget.cpp
@@ -187,7 +187,7 @@ bool Widget::isFocused() const
void Widget::setFocusable(const bool focusable)
{
- if (!focusable && isFocused())
+ if (!focusable && isFocused() && mFocusHandler)
mFocusHandler->focusNone();
mFocusable = focusable;
}
@@ -220,7 +220,7 @@ void Widget::requestMoveToBottom()
void Widget::setVisible(bool visible)
{
- if (!visible && isFocused())
+ if (!visible && isFocused() && mFocusHandler)
mFocusHandler->focusNone();
if (visible)