summaryrefslogtreecommitdiff
path: root/src/qcam
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcam')
-rw-r--r--src/qcam/qt_event_dispatcher.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qcam/qt_event_dispatcher.cpp b/src/qcam/qt_event_dispatcher.cpp
index 5ba451bf..98d2472c 100644
--- a/src/qcam/qt_event_dispatcher.cpp
+++ b/src/qcam/qt_event_dispatcher.cpp
@@ -120,6 +120,9 @@ void QtEventDispatcher::registerTimer(Timer *timer)
void QtEventDispatcher::unregisterTimer(Timer *timer)
{
auto it = timerIds_.find(timer);
+ if (it == timerIds_.end())
+ return;
+
timers_.erase(it->second);
killTimer(it->second);
timerIds_.erase(it);