From 3474e986630907fa2a3f4143012ac2a42796609e Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Mon, 21 Sep 2009 10:06:19 +0200 Subject: [PATCH] Fix initial backlog for buffers with no new messages --- src/core/corebacklogmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/corebacklogmanager.cpp b/src/core/corebacklogmanager.cpp index 1c3fae98..9ef4b899 100644 --- a/src/core/corebacklogmanager.cpp +++ b/src/core/corebacklogmanager.cpp @@ -43,8 +43,8 @@ QVariantList CoreBacklogManager::requestBacklog(BufferId bufferId, MsgId first, msgIter++; } - if(additional) { - MsgId oldestMessage; + if(additional && limit != 0) { + MsgId oldestMessage = first; if(!msgList.isEmpty()) { if(msgList.first().msgId() < msgList.last().msgId()) oldestMessage = msgList.first().msgId(); -- 2.20.1