summaryrefslogtreecommitdiff
path: root/src/gui/focushandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/focushandler.cpp')
-rw-r--r--src/gui/focushandler.cpp4
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();