[Bf-blender-cvs] [6e6123b40f3] blender-v3.0-release: Fix T93080: Crash on scrubbing with snapping

Richard Antalik noreply at git.blender.org
Wed Nov 17 05:43:03 CET 2021


Commit: 6e6123b40f388a62dcb2268f1a87bee4410f995d
Author: Richard Antalik
Date:   Wed Nov 17 05:40:25 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rB6e6123b40f388a62dcb2268f1a87bee4410f995d

Fix T93080: Crash on scrubbing with snapping

Sequencer wasn't initialized, snapping crashed on NULL dereference.
Add Null check.

===================================================================

M	source/blender/editors/animation/anim_ops.c

===================================================================

diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index 8232df968ed..1e60a129535 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -149,7 +149,7 @@ static void change_frame_apply(bContext *C, wmOperator *op)
   bool do_snap = RNA_boolean_get(op->ptr, "snap");
 
   if (do_snap) {
-    if (CTX_wm_space_seq(C)) {
+    if (CTX_wm_space_seq(C) && SEQ_editing_get(scene) != NULL) {
       frame = seq_frame_apply_snap(C, scene, frame);
     }
     else {



More information about the Bf-blender-cvs mailing list