fix up goofy error checking

This commit is contained in:
Glenn Maynard
2006-10-20 09:47:24 +00:00
parent 04b1490b51
commit 352ad4843d
+4 -3
View File
@@ -23,10 +23,11 @@ void ComboGraph::LoadFromNode( const XNode* pNode )
{
ActorFrame::LoadFromNode( pNode );
m_pMaxComboText = (BitmapText *) this->GetChild( "MaxComboText" );
if( m_pMaxComboText == NULL )
Actor *pActor = this->GetChild( "MaxComboText" );
if( pActor == NULL )
RageException::Throw( "%s: ComboGraph: must have a child named \"MaxComboText\"", ActorUtil::GetWhere(pNode).c_str() );
if( dynamic_cast<BitmapText *>(m_pMaxComboText) == NULL )
m_pMaxComboText = dynamic_cast<BitmapText *>( pActor );
if( m_pMaxComboText == NULL )
RageException::Throw( "%s: ComboGraph: \"MaxComboText\" child is not a BitmapText", ActorUtil::GetWhere(pNode).c_str() );
m_pNormalCombo = this->GetChild( "NormalCombo" );