Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit a00f3cb

Browse files
authored
Merge pull request #238 from cortex-command-community/null-deref
Fix possible null pointer dereference in sceneman
2 parents 5337b51 + b575190 commit a00f3cb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Managers/SceneMan.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,10 @@ void SceneMan::Destroy()
437437

438438
Vector SceneMan::GetSceneDim() const
439439
{
440-
if (m_pCurrentScene)
441-
RTEAssert(m_pCurrentScene->GetTerrain() && m_pCurrentScene->GetTerrain()->GetBitmap(), "Trying to get terrain info before there is a scene or terrain!");
442-
return m_pCurrentScene->GetDimensions();
440+
if (m_pCurrentScene) {
441+
RTEAssert(m_pCurrentScene->GetTerrain() && m_pCurrentScene->GetTerrain()->GetBitmap(), "Trying to get terrain info before there is a scene or terrain!");
442+
return m_pCurrentScene->GetDimensions();
443+
}
443444
return Vector();
444445
}
445446

0 commit comments

Comments
 (0)