Bug fix:When parsing a plist file as image mergin, if in fact the plist file is a particle, a crush will occur.

Now it's fixed.
This commit is contained in:
yusheng.lu 2015-01-05 16:59:09 +08:00
parent c7508bb1c6
commit 3c992fe38c
1 changed files with 2 additions and 0 deletions

View File

@ -1332,6 +1332,8 @@ void DataReaderHelper::addDataFromJsonCache(const std::string& fileContent, Data
{
std::string plistPath = filePath + ".plist";
std::string pngPath = filePath + ".png";
ValueMap dict = FileUtils::getInstance()->getValueMapFromFile(dataInfo->baseFilePath + plistPath);
if (dict.find("particleLifespan") != dict.end()) continue;
ArmatureDataManager::getInstance()->addSpriteFrameFromFile((dataInfo->baseFilePath + plistPath).c_str(), (dataInfo->baseFilePath + pngPath).c_str(), dataInfo->filename.c_str());
}