From bda199bd88c448a9dfb9b0a8cc7e68a8103d904f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 12 Aug 2007 22:24:24 +0000 Subject: [PATCH] fix bAllowNull not honored if StepsType_Invalid/Difficulty_Invalid --- stepmania/src/TrailUtil.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stepmania/src/TrailUtil.cpp b/stepmania/src/TrailUtil.cpp index e2ed1656c1..8ca2c2a020 100644 --- a/stepmania/src/TrailUtil.cpp +++ b/stepmania/src/TrailUtil.cpp @@ -24,10 +24,9 @@ Trail *TrailID::ToTrail( const Course *p, bool bAllowNull ) const { ASSERT( p ); - if( st == StepsType_Invalid || cd == Difficulty_Invalid ) - return NULL; - - Trail *pRet = p->GetTrail( st, cd ); + Trail *pRet = NULL; + if( st != StepsType_Invalid && cd != Difficulty_Invalid ) + pRet = p->GetTrail( st, cd ); if( !bAllowNull && pRet == NULL ) RageException::Throw( "%i, %i, \"%s\"", st, cd, p->GetDisplayFullTitle().c_str() );