mirror of
https://github.com/martinrotter/rssguard.git
synced 2024-12-27 00:23:24 +01:00
Potentially fixed crashes on Linux webengine when repopulating it with the same messages.
This commit is contained in:
parent
e3e0d68ee9
commit
f2d9d081ad
13
src/gui/messagepreviewer.cpp
Normal file → Executable file
13
src/gui/messagepreviewer.cpp
Normal file → Executable 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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user