diff --git a/Source/Engine/Level/Level.h b/Source/Engine/Level/Level.h index 4ae1e5bae..b9c6b698a 100644 --- a/Source/Engine/Level/Level.h +++ b/Source/Engine/Level/Level.h @@ -123,6 +123,7 @@ public: /// The scene object (loaded). API_FUNCTION() static Scene* GetScene(int32 index) { + CHECK_RETURN(index < GetScenesCount(), nullptr); return Scenes[index]; }