LevelLoader - Added an if check to se if it found the map file.

This commit is contained in:
Pontus Fransson 2014-02-19 09:39:19 +01:00
parent ca2695293f
commit 6e80c1c603
1 changed files with 148 additions and 145 deletions

View File

@ -33,6 +33,8 @@ std::vector<SmartPointer<ObjectTypeHeader>> LevelParser::Parse(std::string filen
Loader loader;
char* buffer = (char*)loader.LoadFile(filename.c_str(), bufferSize);
if(buffer)
{
//Read format version
LevelLoaderInternal::FormatVersion levelFormatVersion;
ParseObject(&buffer[counter], &levelFormatVersion, sizeof(levelFormatVersion));
@ -213,6 +215,7 @@ std::vector<SmartPointer<ObjectTypeHeader>> LevelParser::Parse(std::string filen
break;
}
}
}
return objects;
}