Skip to content

Commit

Permalink
Abort controller activation when there is no current device (#8694)
Browse files Browse the repository at this point in the history
  • Loading branch information
brizental authored Nov 29, 2023
1 parent 4640992 commit 9d0e326
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,11 @@ void Controller::activateInternal(DNSPortPolicy dnsPort,

MozillaVPN* vpn = MozillaVPN::instance();
const Device* device = vpn->deviceModel()->currentDevice(vpn->keys());
if (!device) {
logger.warning() << "No current device. Aborting activation.";
m_nextStep = Disconnect;
return;
}
SettingsHolder* settingsHolder = SettingsHolder::instance();

// Prepare the exit server's connection data.
Expand Down

0 comments on commit 9d0e326

Please sign in to comment.