Commit 1a372606 authored by Ivan Čukić's avatar Ivan Čukić 👁

Restore network only if needed

If we haven't stored the previous network state,
do not try to restore the network.
parent d6acc777
......@@ -350,9 +350,11 @@ void PlasmaVaultService::openVault(const QString &device)
}
auto stopInhibiting = [this, vault] {
auto& devicesInhibittingNetworking = d->savedNetworkingState->devicesInhibittingNetworking;
auto deviceOpeningHandle = "{opening}" + vault->device().data();
devicesInhibittingNetworking.removeAll(deviceOpeningHandle);
if (d->savedNetworkingState) {
auto& devicesInhibittingNetworking = d->savedNetworkingState->devicesInhibittingNetworking;
auto deviceOpeningHandle = "{opening}" + vault->device().data();
devicesInhibittingNetworking.removeAll(deviceOpeningHandle);
}
};
showPasswordMountDialog(vault,
......
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