From 9c9d46b4b0d7a6b137c10600d42b6f512bc2add4 Mon Sep 17 00:00:00 2001 From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> Date: Mon, 7 Jan 2019 16:13:17 -0500 Subject: [PATCH] fix crash during incoming call and in settings Change-Id: Ifad1befa716beb165deff95908899553095e0925 --- callwidget.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/callwidget.cpp b/callwidget.cpp index 3275b1b..6cd66fe 100644 --- a/callwidget.cpp +++ b/callwidget.cpp @@ -485,9 +485,8 @@ CallWidget::showConversationView() void CallWidget::selectSmartlistItem(const std::string & convUid) { - if (convUid.empty()) { + if (convUid.empty() || !ui->smartList->selectionModel()) return; - } ui->smartList->selectionModel()->setCurrentIndex(QModelIndex(), QItemSelectionModel::Deselect); auto convModel = LRCInstance::getCurrentConversationModel(); auto conversation = Utils::getConversationFromUid(convUid, *convModel); -- GitLab