Skip to content

Commit

Permalink
Fix crash when opening Plugin dialogs (#3035)
Browse files Browse the repository at this point in the history
The crash was caused by an extra moveToThread() call

Re #3034
  • Loading branch information
ptsavol authored Jan 17, 2025
1 parent 27820ec commit 2178a13
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions spinetoolbox/plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def load_individual_plugin(self, plugin_dir, specification_local_data):
def _create_worker(self):
worker = _PluginWorker()
self._workers.append(worker)
worker.finished.connect(lambda worker=worker: self._clean_up_worker(worker))
worker.finished.connect(lambda wrkr=worker: self._clean_up_worker(wrkr))
return worker

def _clean_up_worker(self, worker):
Expand Down Expand Up @@ -199,7 +199,7 @@ def _install_plugin(self, plugin_name):
plugin_local_dir = os.path.join(PLUGINS_PATH, plugin_name)
worker = self._create_worker()
worker.succeeded.connect(
lambda plugin_local_dir=plugin_local_dir: self._load_installed_plugin(plugin_local_dir)
lambda plugin_local_d=plugin_local_dir: self._load_installed_plugin(plugin_local_d)
)
worker.failed.connect(self._toolbox.msg_error)
worker.start(_download_plugin, plugin, plugin_local_dir)
Expand Down Expand Up @@ -269,7 +269,6 @@ class _PluginWorker(QObject):
def __init__(self):
super().__init__()
self._thread = QThread()
self.moveToThread(self._thread)
self._function = None
self._args = None
self._kwargs = None
Expand Down

0 comments on commit 2178a13

Please sign in to comment.