fix blowup. make sure pointers aren't null before using their members.

This commit is contained in:
Thad Ward
2003-08-27 03:14:04 +00:00
parent 1a6d60a6f1
commit 0edd67b70b
+4 -2
View File
@@ -464,12 +464,14 @@ void Background::DrawPrimitives()
if( IsDangerVisible() ) if( IsDangerVisible() )
{ {
// Since this only shows when DANGER is visible, it will flash red on it's own accord :) // Since this only shows when DANGER is visible, it will flash red on it's own accord :)
m_pDancingCharacters->m_bDrawDangerLight = true; if( m_pDancingCharacters )
m_pDancingCharacters->m_bDrawDangerLight = true;
m_BGADanger.Draw(); m_BGADanger.Draw();
} }
else else
{ {
m_pDancingCharacters->m_bDrawDangerLight = false; if( m_pDancingCharacters )
m_pDancingCharacters->m_bDrawDangerLight = false;
if( m_pCurrentBGA ) if( m_pCurrentBGA )
m_pCurrentBGA->Draw(); m_pCurrentBGA->Draw();
if( m_pFadingBGA ) if( m_pFadingBGA )