Commit 53ef77b4 authored by Moritz Brunner's avatar Moritz Brunner Committed by Philippe Gorley

ringmainwindow: prevent segmentation fault

Prevent a segmentation fault in function slotNewConversation

Gitlab: #1054
Change-Id: Iff82c5745b488a65663330f226a631773ba06c67
Reviewed-by: Philippe Gorley's avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent 61e0f7ff
...@@ -2175,11 +2175,13 @@ CppImpl::slotNewConversation(const std::string& uid) ...@@ -2175,11 +2175,13 @@ 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);
try { if (chatViewConversation_) {
auto contactUri = chatViewConversation_->participants.front(); try {
auto contactInfo = accountInfo_->contactModel->getContact(contactUri); auto contactUri = chatViewConversation_->participants.front();
chat_view_update_temporary(CHAT_VIEW(gtk_bin_get_child(GTK_BIN(widgets->frame_call)))); auto contactInfo = accountInfo_->contactModel->getContact(contactUri);
} catch(...) { } chat_view_update_temporary(CHAT_VIEW(gtk_bin_get_child(GTK_BIN(widgets->frame_call))));
} catch(...) { }
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment