From 844916d46edf82311cde48186f179416875d9fb5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 10 Oct 2012 11:37:38 +0000 Subject: [PATCH] check addons are enabled before disabling them (would cause python exceptions when removing a disabled addon). --- release/scripts/modules/addon_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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