instead of assuming png, and returning a bad filename, return false
This commit is contained in:
@@ -47,7 +47,7 @@ Actor* ActorUtil::Create( const RString& sClassName, const XNode* pNode, Actor *
|
||||
return pRet;
|
||||
}
|
||||
|
||||
void ActorUtil::ResolvePath( RString &sPath, const RString &sName )
|
||||
bool ActorUtil::ResolvePath( RString &sPath, const RString &sName )
|
||||
{
|
||||
retry:
|
||||
CollapsePath( sPath );
|
||||
@@ -72,10 +72,7 @@ retry:
|
||||
FlushDirCache();
|
||||
goto retry;
|
||||
case Dialog::ignore:
|
||||
asPaths.push_back( sPath );
|
||||
if( GetExtension(asPaths[0]) == "" )
|
||||
asPaths[0] = SetExtension( asPaths[0], "png" );
|
||||
break;
|
||||
return false;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
@@ -107,6 +104,7 @@ retry:
|
||||
}
|
||||
|
||||
sPath = DerefRedir( sPath );
|
||||
return true;
|
||||
}
|
||||
|
||||
static void PushParamsTable( Lua *L )
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace ActorUtil
|
||||
RString GetWhere( const XNode *pNode );
|
||||
bool GetAttrPath( const XNode *pNode, const RString &sName, RString &sOut );
|
||||
|
||||
void ResolvePath( RString &sPath, const RString &sName );
|
||||
bool ResolvePath( RString &sPath, const RString &sName );
|
||||
|
||||
void SortByZPosition( vector<Actor*> &vActors );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user