diff --git a/toolkit/editor/editor/ui/windows/scene.cc b/toolkit/editor/editor/ui/windows/scene.cc index bf71ac884..caef1138c 100644 --- a/toolkit/editor/editor/ui/windows/scene.cc +++ b/toolkit/editor/editor/ui/windows/scene.cc @@ -80,6 +80,9 @@ Scene::FocusCamera() { auto selection = Tools::SelectionTool::Selection(); + if (selection.IsEmpty()) + return; + //TODO: Use bboxes to more accurately calculate the distance offset to the object after moving the camera Math::vec3 centerPoint = Math::vec3(0);