diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2019-11-10 21:58:22 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2019-11-10 21:58:22 +0300 |
commit | a18b93cc7251036ff0e952c684056eccef52e04f (patch) | |
tree | 349c6436341b1fa227b0787596f465d11169c3ff /blenderkit/bg_blender.py | |
parent | a8f3a26c7de25c3320a93a7de7c8acc22fef8923 (diff) |
BlenderKit: Fix timers failing.
In some cases timers got unregistered, not sure yet why.
This checks if timers are fine regularly.
Also fixes unregistration, that sometimes did throw an error.
Diffstat (limited to 'blenderkit/bg_blender.py')
-rw-r--r-- | blenderkit/bg_blender.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/blenderkit/bg_blender.py b/blenderkit/bg_blender.py index e2596013..9d3521e4 100644 --- a/blenderkit/bg_blender.py +++ b/blenderkit/bg_blender.py @@ -237,5 +237,6 @@ def register(): def unregister(): bpy.utils.unregister_class(KillBgProcess) - bpy.app.timers.unregister(bg_update) + if bpy.app.timers.is_registered(bg_update): + bpy.app.timers.unregister(bg_update) |