From 8212cb61e02aea2ea85472577f27fc4b62dd8dfb Mon Sep 17 00:00:00 2001 From: Zofia Abramowska Date: Wed, 19 Jul 2017 10:40:26 +0200 Subject: [PATCH] Fix popping from empty queue Change-Id: Iba4ced7ae4ddceb3a8a8922bf95b51775d19fe9f --- src/notification-daemon/Logic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/notification-daemon/Logic.cpp b/src/notification-daemon/Logic.cpp index 85d8940..2544c59 100644 --- a/src/notification-daemon/Logic.cpp +++ b/src/notification-daemon/Logic.cpp @@ -184,7 +184,8 @@ bool Logic::isEventProcessed() { void Logic::finishCurrentEvent() { m_popupper.popupClose(); m_currentEvent = EventId(); - m_pendingEvents.pop_front(); + if (!m_pendingEvents.empty()) + m_pendingEvents.pop_front(); } void Logic::processEvents() { -- 2.7.4