Fix error when plugin cant be loaded

Fixes #9403
This commit is contained in:
Philipp Hörist 2018-10-25 21:20:21 +02:00
parent 3dcd6323d2
commit 08fe232695
1 changed files with 2 additions and 0 deletions

View File

@ -163,6 +163,8 @@ class PluginManager(metaclass=Singleton):
if activate: if activate:
pc = self.scan_dir_for_plugins(dst_dir, scan_dirs=True, pc = self.scan_dir_for_plugins(dst_dir, scan_dirs=True,
package=True) package=True)
if not pc:
continue
self.add_plugin(pc[0]) self.add_plugin(pc[0])
plugin = self.plugins[-1] plugin = self.plugins[-1]
self.activate_plugin(plugin) self.activate_plugin(plugin)