X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorebuffersyncer.cpp;h=c89901387a293188624caeb4e74efc1d2a7a4a60;hp=fc4812a2a4322ecd582ab5dd57b1d252dbeacdb2;hb=35ca85f1c4371ee28d00d5ff0195a5b44aadb299;hpb=1cb02004ee5973b89368bd84f234d4652794690d diff --git a/src/core/corebuffersyncer.cpp b/src/core/corebuffersyncer.cpp index fc4812a2..c8990138 100644 --- a/src/core/corebuffersyncer.cpp +++ b/src/core/corebuffersyncer.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -129,13 +129,14 @@ void CoreBufferSyncer::mergeBuffersPermanently(BufferId bufferId1, BufferId buff BufferInfo bufferInfo1 = Core::getBufferInfo(_coreSession->user(), bufferId1); BufferInfo bufferInfo2 = Core::getBufferInfo(_coreSession->user(), bufferId2); if (!bufferInfo1.isValid() || !bufferInfo2.isValid()) { - qWarning() << "CoreBufferSyncer::mergeBufferPermanently(): invalid BufferIds:" << bufferId1 << bufferId2 << "for User:" << _coreSession->user(); + qWarning() << "CoreBufferSyncer::mergeBuffersPermanently(): invalid BufferIds:" << bufferId1 << bufferId2 << "for User:" << _coreSession->user(); return; } - if (bufferInfo1.type() != BufferInfo::QueryBuffer || bufferInfo2.type() != BufferInfo::QueryBuffer) { - qWarning() << "CoreBufferSyncer::mergeBufferPermanently(): only QueryBuffers can be merged!" << bufferId1 << bufferId2; - return; + if ((bufferInfo1.type() != BufferInfo::QueryBuffer && bufferInfo1.type() != BufferInfo::ChannelBuffer) + || (bufferInfo2.type() != BufferInfo::QueryBuffer && bufferInfo2.type() != BufferInfo::ChannelBuffer)) { + qWarning() << "CoreBufferSyncer::mergeBuffersPermanently(): only QueryBuffers and/or ChannelBuffers can be merged!" << bufferId1 << bufferId2; + return; } if (Core::mergeBuffersPermanently(_coreSession->user(), bufferId1, bufferId2)) {