commit 01dac92e19481690e31b06632c1b1833468cee0b
parent 5efaaa523a30dd2ea9866ba3b96ce96a41098c1e
Author: SomberNight <somber.night@protonmail.com>
Date: Thu, 9 Apr 2020 17:55:42 +0200
wizard: fix crash when decrypting wallet hw device
E | __main__ | daemon.run_gui errored
Traceback (most recent call last):
File ".../electrum/run_electrum", line 379, in <module>
d.run_gui(config, plugins)
File "...\electrum\electrum\daemon.py", line 522, in run_gui
self.gui_object.main()
File "...\electrum\electrum\gui\qt\__init__.py", line 362, in main
if not self.start_new_window(path, self.config.get('url'), app_is_starting=True):
File "...\electrum\electrum\gui\qt\__init__.py", line 246, in wrapper
return func(self, *args, **kwargs)
File "...\electrum\electrum\gui\qt\__init__.py", line 270, in start_new_window
wallet = self._start_wizard_to_select_or_create_wallet(path)
File "...\electrum\electrum\gui\qt\__init__.py", line 308, in _start_wizard_to_select_or_create_wallet
path, storage = wizard.select_storage(path, self.daemon.get_wallet)
File "...\electrum\electrum\gui\qt\installwizard.py", line 334, in select_storage
pw_e.clear()
File "...\electrum\electrum\gui\qt\util.py", line 759, in clear
self.setText(len(self.text()) * " ")
RuntimeError: wrapped C/C++ object of type PasswordLineEdit has been deleted
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/electrum/gui/qt/installwizard.py b/electrum/gui/qt/installwizard.py
@@ -331,7 +331,10 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
try:
run_user_interaction_loop()
finally:
- pw_e.clear()
+ try:
+ pw_e.clear()
+ except RuntimeError: # wrapped C/C++ object has been deleted.
+ pass # happens when decrypting with hw device
return temp_storage.path, (temp_storage if temp_storage.file_exists() else None)