Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-10 15:37:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-10 15:37:38 +0400
commit844916d46edf82311cde48186f179416875d9fb5 (patch)
treef451f767240b56889244e2cbfc12f38fea6115c8 /release
parent6514290d1daf62b34f4f927f6c9129b2c558b337 (diff)
check addons are enabled before disabling them (would cause python exceptions when removing a disabled addon).
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/addon_utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index ab68c9424cd..6658ee7fb2b 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -311,7 +311,7 @@ def disable(module_name, default_set=True):
# 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