Fix: preload() method on datablocks should always set errorStr when returning false.

Otherwise it will dump the previous error message (content of the errorStr).
This commit is contained in:
bank 2014-03-27 12:23:36 +04:00
parent 008e34eb8e
commit b2e6895554
5 changed files with 11 additions and 0 deletions

View file

@ -306,7 +306,10 @@ bool ShapeBaseData::preload(bool server, String &errorStr)
Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(mShape.getPath());
if (!fileRef)
{
errorStr = String::ToString("ShapeBaseData: Couldn't load shape \"%s\"",shapeName);
return false;
}
if(server)
mCRC = fileRef->getChecksum();