Revision: 51254
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51254
Author:   campbellbarton
Date:     2012-10-10 11:37:38 +0000 (Wed, 10 Oct 2012)
Log Message:
-----------
check addons are enabled before disabling them (would cause python exceptions 
when removing a disabled addon).

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/addon_utils.py

Modified: trunk/blender/release/scripts/modules/addon_utils.py
===================================================================
--- trunk/blender/release/scripts/modules/addon_utils.py        2012-10-10 
11:36:24 UTC (rev 51253)
+++ trunk/blender/release/scripts/modules/addon_utils.py        2012-10-10 
11:37:38 UTC (rev 51254)
@@ -311,7 +311,7 @@
     # possible this addon is from a previous session and didn't load a
     # module this time. So even if the module is not found, still disable
     # the addon in the user prefs.
-    if mod:
+    if mod and getattr(mod, "__addon_enabled__", False) is not False:
         mod.__addon_enabled__ = False
         mod.__addon_persistent = False
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to