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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <mail@jlucke.com>2019-02-28 18:07:56 +0300
committerJacques Lucke <mail@jlucke.com>2019-02-28 18:07:56 +0300
commit921c37bfa3108708cb6c2a6cd7c1b1a588be2d74 (patch)
tree36d03fe834877bac174a60aa8b99b24aac13d51f /source/blender
parent5938fd4cccaa71aca3250ce08b336518a773c59a (diff)
Fix T62050: remove non-persistent timers in load-pre callback
This actually makes more sense than removing them in the load-post callback. During load, the file might register timers that would be removed immediately.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/intern/BLI_timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/BLI_timer.c b/source/blender/blenlib/intern/BLI_timer.c
index a09dc7f68ec..d361a1c563d 100644
--- a/source/blender/blenlib/intern/BLI_timer.c
+++ b/source/blender/blenlib/intern/BLI_timer.c
@@ -164,7 +164,7 @@ static void remove_non_persistent_functions(struct Main *UNUSED(_1), struct ID *
}
}
-static bCallbackFuncStore load_post_callback = {
+static bCallbackFuncStore load_pre_callback = {
NULL, NULL, /* next, prev */
remove_non_persistent_functions, /* func */
NULL, /* arg */
@@ -174,7 +174,7 @@ static bCallbackFuncStore load_post_callback = {
static void ensure_callback_is_registered()
{
if (!GlobalTimer.file_load_cb_registered) {
- BLI_callback_add(&load_post_callback, BLI_CB_EVT_LOAD_POST);
+ BLI_callback_add(&load_pre_callback, BLI_CB_EVT_LOAD_PRE);
GlobalTimer.file_load_cb_registered = true;
}
}