Skip to content
Permalink
Browse files
Better cleanup of resources when unloading plugins
git-svn-id: http://svn.osgeo.org/qgis/trunk@13773 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jun 21, 2010
1 parent e24d11f commit 9d1d81e18fa9e0ce20632d210fd035e100c52861
Showing with 5 additions and 5 deletions.
  1. +5 −5 python/utils.py
@@ -216,11 +216,11 @@ def _unloadPluginModules(packageName):
# 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
if "resources" in mod:
try:
sys.modules[mod].qCleanupResources()
except:
pass
try:
if hasattr(sys.modules[mod], 'qCleanupResources'):
sys.modules[mod].qCleanupResources()
except:
pass
# try to remove the module from python
try:
del sys.modules[mod]

0 comments on commit 9d1d81e

Please sign in to comment.