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:
authorHans Goudey <h.goudey@me.com>2020-11-13 01:06:57 +0300
committerHans Goudey <h.goudey@me.com>2020-11-13 01:06:57 +0300
commitcd49afc596a0b24ce9e0045afb03906aca481b9a (patch)
tree4e0ca4f9182979aa7bae40383e332d83a7fd9a0d /source/blender/editors/space_view3d/view3d_camera_control.c
parent55e2930c18a4953b5b7d999896e0f86c4794870a (diff)
Fix T82596: Fly/walk navigation crash
Add a NULL check for the View3D's camera, because these modes can be entered even without an active camera.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_camera_control.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_camera_control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_camera_control.c b/source/blender/editors/space_view3d/view3d_camera_control.c
index bce0e49d60a..11643960595 100644
--- a/source/blender/editors/space_view3d/view3d_camera_control.c
+++ b/source/blender/editors/space_view3d/view3d_camera_control.c
@@ -138,7 +138,8 @@ struct View3DCameraControl *ED_view3d_cameracontrol_acquire(Depsgraph *depsgraph
vctrl->ctx_v3d = v3d;
vctrl->ctx_rv3d = rv3d;
- vctrl->use_parent_root = v3d->camera->transflag & OB_TRANSFORM_ADJUST_ROOT_PARENT_FOR_VIEW_LOCK;
+ vctrl->use_parent_root = v3d->camera != NULL &&
+ v3d->camera->transflag & OB_TRANSFORM_ADJUST_ROOT_PARENT_FOR_VIEW_LOCK;
vctrl->persp_backup = rv3d->persp;
vctrl->dist_backup = rv3d->dist;