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.
This commit is contained in:
parent
55e2930c18
commit
cd49afc596
Notes:
blender-bot
2023-02-14 09:48:25 +01:00
Referenced by issue #82596, fly/walk navigation crash
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue