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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVilém Duha <vilda.novak@gmail.com>2019-11-10 21:58:22 +0300
committerVilém Duha <vilda.novak@gmail.com>2019-11-10 21:58:22 +0300
commita18b93cc7251036ff0e952c684056eccef52e04f (patch)
tree349c6436341b1fa227b0787596f465d11169c3ff /blenderkit/download.py
parenta8f3a26c7de25c3320a93a7de7c8acc22fef8923 (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/download.py')
-rw-r--r--blenderkit/download.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/blenderkit/download.py b/blenderkit/download.py
index 3e4d49d6..6c3f8ccf 100644
--- a/blenderkit/download.py
+++ b/blenderkit/download.py
@@ -928,4 +928,5 @@ def unregister_download():
bpy.utils.unregister_class(BlenderkitKillDownloadOperator)
bpy.app.handlers.load_post.remove(scene_load)
bpy.app.handlers.save_pre.remove(scene_save)
- bpy.app.timers.unregister(timer_update)
+ if bpy.app.timers.is_registered(timer_update):
+ bpy.app.timers.unregister(timer_update)