diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-05-18 12:58:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-05-18 12:58:11 +0300 |
commit | aa06be9148a3a75cf117454a8009d90bdc4541d9 (patch) | |
tree | 8eac21eda2f37def95f6f27967c04db8fcc95602 /release | |
parent | b236653f8a4c0ae6a46369c6ff420d9f4a619808 (diff) |
Fix error calling select-camera without a 3D view
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/object.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py index 5a388047ddd..d61bed71cab 100644 --- a/release/scripts/startup/bl_operators/object.py +++ b/release/scripts/startup/bl_operators/object.py @@ -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 |