Skip to content

Commit

Permalink
Avoid crash when a plugin in .perspective is not available (#110)
Browse files Browse the repository at this point in the history
* Avoid crash when plugin in .perspective is not available and just print a warning #109

* More context in warning
  • Loading branch information
lucasw authored and dhood committed Mar 6, 2018
1 parent ab6dbb2 commit 2333cb0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions qt_gui/src/qt_gui/plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ def _load_plugin_load(self, instance_id, callback, argv=None):

handler.set_minimized_dock_widgets_toolbar(self._minimized_dock_widgets_toolbar)

if instance_id.plugin_id not in self._plugin_descriptors.keys():
qWarning(
'PluginManager._load_plugin() could not load plugin "%s": plugin not available' %
(instance_id.plugin_id))
return
plugin_descriptor = self._plugin_descriptors[instance_id.plugin_id]
handler.set_plugin_descriptor(plugin_descriptor)

Expand Down

0 comments on commit 2333cb0

Please sign in to comment.