From c0105bdfcfae2ba2d3bb35498dceb51073c6d8f5 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 26 Apr 2019 12:10:14 +1000 Subject: [PATCH] Fix exception when reloading plugins --- python/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/utils.py b/python/utils.py index 9009c66cd0b..7d37cf76114 100644 --- a/python/utils.py +++ b/python/utils.py @@ -445,6 +445,9 @@ def _unloadPluginModules(packageName): mods = _plugin_modules[packageName] for mod in mods: + if not mod in sys.modules: + continue + # if it looks like a Qt resource file, try to do a cleanup # otherwise we might experience a segfault next time the plugin is loaded # because Qt will try to access invalid plugin resource data