Fix error calling select-camera without a 3D view
This commit is contained in:
parent
b236653f8a
commit
aa06be9148
@ -133,7 +133,7 @@ class SelectCamera(Operator):
|
||||
scene = context.scene
|
||||
view_layer = context.view_layer
|
||||
view = context.space_data
|
||||
if view.type == 'VIEW_3D' and view.use_local_camera:
|
||||
if view and view.type == 'VIEW_3D' and view.use_local_camera:
|
||||
camera = view.camera
|
||||
else:
|
||||
camera = scene.camera
|
||||
|
Loading…
Reference in New Issue
Block a user