wizard restore: abort if wallet is None
[electrum-nvc.git] / gui / qt / installwizard.py
index 5e03566..2b074f8 100644 (file)
@@ -545,7 +545,9 @@ class InstallWizard(QDialog):
                 wallet.create_accounts(password)
 
             else:
-                 wallet = run_hook('installwizard_restore', self, self.storage)
+                wallet = run_hook('installwizard_restore', self, self.storage)
+                if not wallet:
+                    return
 
             # create first keys offline
             self.waiting_dialog(wallet.synchronize)