Fix MP3 extraction crash

This commit is contained in:
Jack Andersen
2019-11-16 20:48:07 -10:00
parent 8ad13ff4c9
commit 6e2bf5be83
8 changed files with 127 additions and 146 deletions

View File

@@ -40,7 +40,7 @@ void CMaterialCooker::WriteMatSetPrime(IOutputStream& rOut)
for (uint32 iMat = 0; iMat < NumMats; iMat++)
{
CMaterial *pMat = mpSet->mMaterials[iMat];
CMaterial *pMat = mpSet->mMaterials[iMat].get();
uint32 NumPasses = pMat->PassCount();
for (uint32 iPass = 0; iPass < NumPasses; iPass++)
@@ -74,7 +74,7 @@ void CMaterialCooker::WriteMatSetPrime(IOutputStream& rOut)
for (uint32 iMat = 0; iMat < NumMats; iMat++)
{
mpMat = mpSet->mMaterials[iMat];
mpMat = mpSet->mMaterials[iMat].get();
WriteMaterialPrime(rOut);
MatEndOffsets[iMat] = rOut.Tell() - MatsStart;
}