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