Skip to content
Snippets Groups Projects
Commit 53ef77b4 authored by Moritz Brunner's avatar Moritz Brunner Committed by Philippe Gorley
Browse files

ringmainwindow: prevent segmentation fault


Prevent a segmentation fault in function slotNewConversation

Gitlab: #1054
Change-Id: Iff82c5745b488a65663330f226a631773ba06c67
Reviewed-by: default avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent 61e0f7ff
Branches
No related tags found
No related merge requests found
...@@ -2175,6 +2175,7 @@ CppImpl::slotNewConversation(const std::string& uid) ...@@ -2175,6 +2175,7 @@ CppImpl::slotNewConversation(const std::string& uid)
auto* old_view = gtk_bin_get_child(GTK_BIN(widgets->frame_call)); auto* old_view = gtk_bin_get_child(GTK_BIN(widgets->frame_call));
if (IS_RING_WELCOME_VIEW(old_view)) { if (IS_RING_WELCOME_VIEW(old_view)) {
accountInfo_->conversationModel->selectConversation(uid); accountInfo_->conversationModel->selectConversation(uid);
if (chatViewConversation_) {
try { try {
auto contactUri = chatViewConversation_->participants.front(); auto contactUri = chatViewConversation_->participants.front();
auto contactInfo = accountInfo_->contactModel->getContact(contactUri); auto contactInfo = accountInfo_->contactModel->getContact(contactUri);
...@@ -2182,6 +2183,7 @@ CppImpl::slotNewConversation(const std::string& uid) ...@@ -2182,6 +2183,7 @@ CppImpl::slotNewConversation(const std::string& uid)
} catch(...) { } } catch(...) { }
} }
} }
}
void void
CppImpl::slotConversationRemoved(const std::string& uid) CppImpl::slotConversationRemoved(const std::string& uid)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment