[IGfxWorld] Reflection null check missing

This commit is contained in:
momo5502 2017-04-16 01:51:23 +02:00
parent 0218c76a26
commit 79c38f44f3

View File

@ -596,9 +596,12 @@ namespace Assets
buffer->saveArray(asset->reflectionImages, asset->reflectionProbeCount); buffer->saveArray(asset->reflectionImages, asset->reflectionProbeCount);
for (unsigned int i = 0; i < asset->reflectionProbeCount; ++i) for (unsigned int i = 0; i < asset->reflectionProbeCount; ++i)
{
if (asset->reflectionImages[i])
{ {
imageDest[i] = builder->saveSubAsset(Game::XAssetType::ASSET_TYPE_IMAGE, asset->reflectionImages[i]).image; imageDest[i] = builder->saveSubAsset(Game::XAssetType::ASSET_TYPE_IMAGE, asset->reflectionImages[i]).image;
} }
}
Utils::Stream::ClearPointer(&dest->reflectionImages); Utils::Stream::ClearPointer(&dest->reflectionImages);
} }