mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-23 16:30:06 -05:00
Merge pull request #2702 from csoler/v0.6-BugFixing_28
fixed crash due to calling a method in board item after deletion
This commit is contained in:
commit
e786669dc2
@ -287,14 +287,13 @@ void BaseBoardsCommentsItem::readToggled(bool checked)
|
||||
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]() {
|
||||
RsGxsGrpMsgIdPair msgPair = std::make_pair(groupId(), messageId());
|
||||
|
||||
rsPosted->setCommentReadStatus(msgPair, !checked);
|
||||
|
||||
RsQThreadUtils::postToObject( [this,checked]() {
|
||||
setReadStatus(false, checked);
|
||||
} );
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user