Fixed crash

This commit is contained in:
Albert Vaca 2015-06-21 19:43:21 -07:00
parent 02bc1bcd90
commit c8e0c474ef

View file

@ -143,6 +143,9 @@ void KdeConnectKcm::refresh()
void KdeConnectKcm::resetSelection()
{
if (!currentDevice) {
return;
}
kcmUi->deviceList->selectionModel()->setCurrentIndex(sortProxyModel->mapFromSource(currentIndex), QItemSelectionModel::ClearAndSelect);
}
@ -162,6 +165,7 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current)
pluginsConfigChanged();
if (!current.isValid()) {
currentDevice = NULL;
kcmUi->deviceInfo->setVisible(false);
return;
}