diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-10 15:37:38 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-10 15:37:38 +0400 |
commit | 844916d46edf82311cde48186f179416875d9fb5 (patch) | |
tree | f451f767240b56889244e2cbfc12f38fea6115c8 /release/scripts/modules/addon_utils.py | |
parent | 6514290d1daf62b34f4f927f6c9129b2c558b337 (diff) |
check addons are enabled before disabling them (would cause python exceptions when removing a disabled addon).
Diffstat (limited to 'release/scripts/modules/addon_utils.py')
-rw-r--r-- | release/scripts/modules/addon_utils.py | 2 |
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 |