[IFxEffectDef] Add nullpointer check for material preloading

This commit is contained in:
momo5502 2016-11-29 08:32:15 +01:00
parent d596cdc97b
commit 5489fa2461

View File

@ -62,12 +62,19 @@ namespace Assets
if (elemDef->visuals.markArray)
{
for (char j = 0; j < elemDef->visualCount; ++j)
{
if (elemDef->visuals.markArray[j].data[0])
{
builder->loadAsset(Game::XAssetType::ASSET_TYPE_MATERIAL, elemDef->visuals.markArray[j].data[0]->name);
}
if (elemDef->visuals.markArray[j].data[1])
{
builder->loadAsset(Game::XAssetType::ASSET_TYPE_MATERIAL, elemDef->visuals.markArray[j].data[1]->name);
}
}
}
}
else if (elemDef->visualCount > 1)
{
if (elemDef->visuals.array)