Fix T55774: Crash when reloading clip during prefetch
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 4 Dec 2018 15:39:21 +0000 (16:39 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 4 Dec 2018 15:40:04 +0000 (16:40 +0100)
Simply kill prefetch jobs when reloading. Not sure what else
we can do here..

source/blender/editors/space_clip/clip_ops.c

index e56ec98a232eb04cf407b9bf7da30e1419400690..e907fdfc570ba3e294bf1b37abb2267b15218bea 100644 (file)
@@ -322,6 +322,7 @@ static int reload_exec(bContext *C, wmOperator *UNUSED(op))
        if (!clip)
                return OPERATOR_CANCELLED;
 
+       WM_jobs_kill_type(CTX_wm_manager(C), NULL, WM_JOB_TYPE_CLIP_PREFETCH);
        BKE_movieclip_reload(CTX_data_main(C), clip);
 
        WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);