diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-07-11 00:12:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-11 00:12:09 +0300 |
commit | 4fbb944f132eb886a6f5b350e5a14a4fe380aacf (patch) | |
tree | 6df2ed96430610ee7c35a7ca4902bbdade0e8e34 /src/gui/focushandler.cpp | |
parent | 1dc012a3bb44218778568e8f80c4e9b445802195 (diff) | |
download | manaplus-4fbb944f132eb886a6f5b350e5a14a4fe380aacf.tar.gz manaplus-4fbb944f132eb886a6f5b350e5a14a4fe380aacf.tar.bz2 manaplus-4fbb944f132eb886a6f5b350e5a14a4fe380aacf.tar.xz manaplus-4fbb944f132eb886a6f5b350e5a14a4fe380aacf.zip |
Add missing checks into gui.
Diffstat (limited to 'src/gui/focushandler.cpp')
-rw-r--r-- | src/gui/focushandler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/focushandler.cpp b/src/gui/focushandler.cpp index 41cea3a82..667cb81d0 100644 --- a/src/gui/focushandler.cpp +++ b/src/gui/focushandler.cpp @@ -339,6 +339,8 @@ void FocusHandler::distributeFocusGainedEvent(const Event &focusEvent) Widget *const sourceWidget = focusEvent.getSource(); + if (!sourceWidget) + return; std::list<FocusListener*> focusListeners = sourceWidget->getFocusListeners(); @@ -550,6 +552,8 @@ void FocusHandler::focusNone() void FocusHandler::distributeFocusLostEvent(const Event& focusEvent) { Widget *const sourceWidget = focusEvent.getSource(); + if (!sourceWidget) + return; std::list<FocusListener*> focusListeners = sourceWidget->getFocusListeners(); |