Fix T57130: Crash when running 'set active object as camera' on an empty
Reviewed By: brecht https://developer.blender.org/D3782
This commit is contained in:
parent
84cf670d1d
commit
1fad887d9e
Notes:
blender-bot
2023-02-14 07:39:46 +01:00
Referenced by issue #57130, Crash when running 'set active object as camera' on an empty
|
@ -634,7 +634,7 @@ static void OBJECT_engine_init(void *vedata)
|
|||
}
|
||||
|
||||
float dist;
|
||||
if (rv3d->persp == RV3D_CAMOB && v3d->camera) {
|
||||
if (rv3d->persp == RV3D_CAMOB && v3d->camera && v3d->camera->type == OB_CAMERA) {
|
||||
Object *camera_object = DEG_get_evaluated_object(draw_ctx->depsgraph, v3d->camera);
|
||||
dist = ((Camera *)(camera_object->data))->clipend;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue