Add check return for index in Level.GetScene

This commit is contained in:
Chandler Cox
2024-08-05 13:25:35 -05:00
parent 0b03a5da0d
commit 3674d149dc

View File

@@ -123,6 +123,7 @@ public:
/// <returns>The scene object (loaded).</returns>
API_FUNCTION() static Scene* GetScene(int32 index)
{
CHECK_RETURN(index < GetScenesCount(), nullptr);
return Scenes[index];
}