Skip to content
Permalink
Browse files
Better cleanup of resources when unloading plugins
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13773 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jun 21, 2010
1 parent 4376e77 commit 58a0caa46ba787197cd43ca263bb54e000c8b38e
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 58a0caa

Please sign in to comment.