Browse Source

fix(chatform): fix a crash when there are no messages to load

reviewable/pr5762/r1
sudden6 6 years ago
parent
commit
040c6b95ae
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
  1. 4
      src/widget/form/genericchatform.cpp

4
src/widget/form/genericchatform.cpp

@ -1099,6 +1099,10 @@ void GenericChatForm::loadHistoryLower() @@ -1099,6 +1099,10 @@ void GenericChatForm::loadHistoryLower()
void GenericChatForm::loadHistoryUpper()
{
if (messages.empty()) {
return;
}
auto msg = messages.crbegin()->second;
loadHistoryFrom(QDateTime());
chatWidget->scrollToLine(msg);

Loading…
Cancel
Save