fix bAllowNull not honored if StepsType_Invalid/Difficulty_Invalid
This commit is contained in:
@@ -24,10 +24,9 @@ Trail *TrailID::ToTrail( const Course *p, bool bAllowNull ) const
|
|||||||
{
|
{
|
||||||
ASSERT( p );
|
ASSERT( p );
|
||||||
|
|
||||||
if( st == StepsType_Invalid || cd == Difficulty_Invalid )
|
Trail *pRet = NULL;
|
||||||
return NULL;
|
if( st != StepsType_Invalid && cd != Difficulty_Invalid )
|
||||||
|
pRet = p->GetTrail( st, cd );
|
||||||
Trail *pRet = p->GetTrail( st, cd );
|
|
||||||
if( !bAllowNull && pRet == NULL )
|
if( !bAllowNull && pRet == NULL )
|
||||||
RageException::Throw( "%i, %i, \"%s\"", st, cd, p->GetDisplayFullTitle().c_str() );
|
RageException::Throw( "%i, %i, \"%s\"", st, cd, p->GetDisplayFullTitle().c_str() );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user