Fix T97733: Crash when adding new scene

Caused by NULL dereference if sequencer data does not exist.
This commit is contained in:
Richard Antalik 2022-05-03 09:46:38 +02:00
parent cc0c4c17f0
commit fd98403211
Notes: blender-bot 2023-02-14 10:37:49 +01:00
Referenced by issue #97733, Regression: VSE crash when opening/changing scene
1 changed files with 4 additions and 0 deletions

View File

@ -550,6 +550,10 @@ static void sequencer_main_clamp_view(const bContext *C, ARegion *region)
View2D *v2d = &region->v2d;
Editing *ed = SEQ_editing_get(CTX_data_scene(C));
if (ed == NULL) {
return;
}
/* Transformation uses edge panning to move view. Also if smooth view is running, don't apply
* clamping to prevent overriding this functionality. */
if (G.moving || v2d->smooth_timer != NULL) {