diff --git a/callwidget.cpp b/callwidget.cpp index 3275b1b29c625e16e4abbd2d36ae6cfdc826bfd3..6cd66fe1aacbf7e8a8ede75462aabd36ad2fef6c 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);