diff --git a/electrum/daemon.py b/electrum/daemon.py index 5db820f0d..e867882ba 100644 --- a/electrum/daemon.py +++ b/electrum/daemon.py @@ -251,7 +251,8 @@ class Daemon(DaemonThread): return self.wallets.get(path) def stop_wallet(self, path): - wallet = self.wallets.pop(path) + wallet = self.wallets.pop(path, None) + if not wallet: return wallet.stop_threads() def run_cmdline(self, config_options):