Branch 'kolab/integration/4.13.0' - akonadi/changerecorder_p.cpp

Aaron Seigo seigo at kolabsys.com
Tue Oct 14 16:15:16 CEST 2014


 akonadi/changerecorder_p.cpp |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f45a86c59f24a15d778e43bd3722bff6bd00fd59
Author: Aaron Seigo <aseigo at kde.org>
Date:   Tue Oct 14 16:13:31 2014 +0200

    only dequeue if there is something in the queue

diff --git a/akonadi/changerecorder_p.cpp b/akonadi/changerecorder_p.cpp
index 738c153..6b3fb4f 100644
--- a/akonadi/changerecorder_p.cpp
+++ b/akonadi/changerecorder_p.cpp
@@ -501,8 +501,11 @@ void ChangeRecorderPrivate::notificationsEnqueued(int count)
 
 void ChangeRecorderPrivate::dequeueNotification()
 {
-    pendingNotifications.dequeue();
+    if (pendingNotifications.isEmpty()) {
+        return;
+    }
 
+    pendingNotifications.dequeue();
     if (enableChangeRecording) {
 
         Q_ASSERT(pendingNotifications.count() == m_lastKnownNotificationsCount - 1);




More information about the commits mailing list