check addons are enabled before disabling them (would cause python exceptions when removing a disabled addon).
This commit is contained in:
@@ -311,7 +311,7 @@ def disable(module_name, default_set=True):
|
|||||||
# possible this addon is from a previous session and didn't load a
|
# 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
|
# module this time. So even if the module is not found, still disable
|
||||||
# the addon in the user prefs.
|
# 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_enabled__ = False
|
||||||
mod.__addon_persistent = False
|
mod.__addon_persistent = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user