mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed crash due to calling a method in board item after deletion
This commit is contained in:
parent
b124222d87
commit
3c583f6724
@ -287,14 +287,13 @@ void BaseBoardsCommentsItem::readToggled(bool checked)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setReadStatus(false, checked); // Can't call this inside an async call since the widget may be destroyed afterwards!
|
||||||
|
// So we do it right away.
|
||||||
|
|
||||||
RsThread::async( [this,checked]() {
|
RsThread::async( [this,checked]() {
|
||||||
RsGxsGrpMsgIdPair msgPair = std::make_pair(groupId(), messageId());
|
RsGxsGrpMsgIdPair msgPair = std::make_pair(groupId(), messageId());
|
||||||
|
|
||||||
rsPosted->setCommentReadStatus(msgPair, !checked);
|
rsPosted->setCommentReadStatus(msgPair, !checked);
|
||||||
|
|
||||||
RsQThreadUtils::postToObject( [this,checked]() {
|
|
||||||
setReadStatus(false, checked);
|
|
||||||
} );
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user