Potentially fixed crashes on Linux webengine when repopulating it with the same messages.

This commit is contained in:
Martin Rotter 2016-06-13 07:45:28 +02:00
parent e3e0d68ee9
commit f2d9d081ad

13
src/gui/messagepreviewer.cpp Normal file → Executable file
View File

@ -62,6 +62,19 @@ void MessagePreviewer::clear() {
}
void MessagePreviewer::loadMessages(const QList<Message> &messages, RootItem *root) {
if (m_messages.size() == messages.size()) {
for (int i = 0; i < messages.size(); i++) {
if (m_messages.at(i).m_customId != messages.at(i).m_customId) {
break;
}
if (i == messages.size() - 1) {
// We checked last items, both collections contain the same messages.
return;
}
}
}
m_messages = messages;
m_root = root;