Marketplace plugin registry is None on initialization, and is loaded after running show().

This makes a check that the window is open before continuing through checkIfRestartNeeded

CURA-6990
This commit is contained in:
j.delarago 2022-06-01 16:56:02 +02:00
parent 0df21e6073
commit b015617e13

View file

@ -103,6 +103,9 @@ class Marketplace(Extension, QObject):
self.setTabShown(1) self.setTabShown(1)
def checkIfRestartNeeded(self) -> None: def checkIfRestartNeeded(self) -> None:
if self._window is None:
return
if self._package_manager.hasPackagesToRemoveOrInstall or \ if self._package_manager.hasPackagesToRemoveOrInstall or \
cast(PluginRegistry, self._plugin_registry).getCurrentSessionActivationChangedPlugins(): cast(PluginRegistry, self._plugin_registry).getCurrentSessionActivationChangedPlugins():
self._restart_needed = True self._restart_needed = True