mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 06:45:45 +02:00
conversationmodel: fix crash if no interaction
Change-Id: Id50f7b2598e0cff7ca75f5fca13473702da5c207
This commit is contained in:
parent
bf4a8c314f
commit
6c8a5d7bc6
1 changed files with 3 additions and 1 deletions
|
@ -2344,7 +2344,9 @@ ConversationModelPimpl::slotConversationLoaded(uint32_t requestId,
|
||||||
if (conversation.lastMessageUid.isEmpty() && !conversation.allMessagesLoaded
|
if (conversation.lastMessageUid.isEmpty() && !conversation.allMessagesLoaded
|
||||||
&& messages.size() != 0) {
|
&& messages.size() != 0) {
|
||||||
if (conversation.interactions->size() > 0) {
|
if (conversation.interactions->size() > 0) {
|
||||||
QString newLast = conversation.interactions->rbegin()->first;
|
QString newLast;
|
||||||
|
if (conversation.interactions->size() > 0)
|
||||||
|
newLast = conversation.interactions->rbegin()->first;
|
||||||
if (newLast == oldLast && !newLast.isEmpty()) { // [[unlikely]] in c++20
|
if (newLast == oldLast && !newLast.isEmpty()) { // [[unlikely]] in c++20
|
||||||
qCritical() << "Loading loop detected for " << conversationId << "(" << newLast
|
qCritical() << "Loading loop detected for " << conversationId << "(" << newLast
|
||||||
<< ")";
|
<< ")";
|
||||||
|
|
Loading…
Add table
Reference in a new issue