Skip to content
Snippets Groups Projects
Commit 4e088783 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

misc: avoid weird crash

Change-Id: I6e42a4f494b42330bafcfa4c9616ab78818ddf00
parent 9f42301b
No related branches found
No related tags found
No related merge requests found
...@@ -655,6 +655,10 @@ ConversationModel::getFilteredConversations(const profile::Type& profileType, ...@@ -655,6 +655,10 @@ ConversationModel::getFilteredConversations(const profile::Type& profileType,
OptRef<conversation::Info> OptRef<conversation::Info>
ConversationModel::getConversationForUid(const QString& uid) const ConversationModel::getConversationForUid(const QString& uid) const
{ {
if (!pimpl_) {
qWarning() << "Invalid pimpl_";
return std::nullopt;
}
try { try {
return std::make_optional(pimpl_->getConversationForUid(uid, true)); return std::make_optional(pimpl_->getConversationForUid(uid, true));
} catch (const std::out_of_range&) { } catch (const std::out_of_range&) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment