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

Commit 6f9e913

Browse files
committed
Safety check to stop an assert I got when alt+f4ing. This probably shouldn't happen normally, I blame the dumb metagame
1 parent 910fdec commit 6f9e913

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Managers/PostProcessMan.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,15 @@ namespace RTE {
204204
bool unseen = false;
205205
Vector postEffectPosRelativeToBox;
206206

207-
for (PostEffect &scenePostEffect : m_PostSceneEffects) {
208-
if (team != Activity::NoTeam) { unseen = g_SceneMan.IsUnseen(scenePostEffect.m_Pos.GetFloorIntX(), scenePostEffect.m_Pos.GetFloorIntY(), team); }
209-
210-
if (WithinBox(scenePostEffect.m_Pos, boxPos, static_cast<float>(boxWidth), static_cast<float>(boxHeight)) && !unseen) {
211-
found = true;
212-
postEffectPosRelativeToBox = scenePostEffect.m_Pos - boxPos;
213-
effectsList.push_back(PostEffect(postEffectPosRelativeToBox, scenePostEffect.m_Bitmap, scenePostEffect.m_BitmapHash, scenePostEffect.m_Strength, scenePostEffect.m_Angle));
207+
if (g_SceneMan.GetScene()) {
208+
for (PostEffect &scenePostEffect : m_PostSceneEffects) {
209+
if (team != Activity::NoTeam) { unseen = g_SceneMan.IsUnseen(scenePostEffect.m_Pos.GetFloorIntX(), scenePostEffect.m_Pos.GetFloorIntY(), team); }
210+
211+
if (WithinBox(scenePostEffect.m_Pos, boxPos, static_cast<float>(boxWidth), static_cast<float>(boxHeight)) && !unseen) {
212+
found = true;
213+
postEffectPosRelativeToBox = scenePostEffect.m_Pos - boxPos;
214+
effectsList.push_back(PostEffect(postEffectPosRelativeToBox, scenePostEffect.m_Bitmap, scenePostEffect.m_BitmapHash, scenePostEffect.m_Strength, scenePostEffect.m_Angle));
215+
}
214216
}
215217
}
216218
return found;

0 commit comments

Comments
 (0)