diff --git a/source/graphics/scripting/JSInterface_GameView.cpp b/source/graphics/scripting/JSInterface_GameView.cpp index b7a9b5d742..c84d8d64ae 100644 --- a/source/graphics/scripting/JSInterface_GameView.cpp +++ b/source/graphics/scripting/JSInterface_GameView.cpp @@ -103,7 +103,9 @@ void JSI_GameView::CameraMoveTo(ScriptInterface::CmptPrivate* UNUSED(pCmptPrivat */ void JSI_GameView::SetCameraTarget(ScriptInterface::CmptPrivate* UNUSED(pCmptPrivate), float x, float y, float z) { - g_Game->GetView()->ResetCameraTarget(CVector3D(x, y, z)); + if (!g_Game || !g_Game->GetView()) + return; + g_Game->GetView()->MoveCameraTarget(CVector3D(x, y, z)); } /**