Fixed crash
This commit is contained in:
parent
02bc1bcd90
commit
c8e0c474ef
1 changed files with 4 additions and 0 deletions
|
@ -143,6 +143,9 @@ void KdeConnectKcm::refresh()
|
||||||
|
|
||||||
void KdeConnectKcm::resetSelection()
|
void KdeConnectKcm::resetSelection()
|
||||||
{
|
{
|
||||||
|
if (!currentDevice) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
kcmUi->deviceList->selectionModel()->setCurrentIndex(sortProxyModel->mapFromSource(currentIndex), QItemSelectionModel::ClearAndSelect);
|
kcmUi->deviceList->selectionModel()->setCurrentIndex(sortProxyModel->mapFromSource(currentIndex), QItemSelectionModel::ClearAndSelect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +165,7 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current)
|
||||||
pluginsConfigChanged();
|
pluginsConfigChanged();
|
||||||
|
|
||||||
if (!current.isValid()) {
|
if (!current.isValid()) {
|
||||||
|
currentDevice = NULL;
|
||||||
kcmUi->deviceInfo->setVisible(false);
|
kcmUi->deviceInfo->setVisible(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue