X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcorebacklogmanager.cpp;h=9ef4b8990e2279fbe46b8c29c38e7e62dda710ef;hb=11cecc112915cd9940e7612c05091f9b5bb18b00;hp=1c3fae98b5604592b6626db83e12c8f2b8605c95;hpb=70283ef877bdf3339fb067667ad9130ceabd8b9a;p=quassel.git 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();