134062 Use after free
parent
96fab1cf55
commit
04e0552f9e
|
@ -168,6 +168,8 @@ bool MakeVerboseFormatProcess::MakeVerboseFormat(aiMesh* pcMesh)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// build output vertex weights
|
// build output vertex weights
|
||||||
for (unsigned int i = 0;i < pcMesh->mNumBones;++i)
|
for (unsigned int i = 0;i < pcMesh->mNumBones;++i)
|
||||||
{
|
{
|
||||||
|
@ -177,11 +179,11 @@ bool MakeVerboseFormatProcess::MakeVerboseFormat(aiMesh* pcMesh)
|
||||||
aiVertexWeight *weightToCopy = &( newWeights[i][0] );
|
aiVertexWeight *weightToCopy = &( newWeights[i][0] );
|
||||||
memcpy(pcMesh->mBones[i]->mWeights, weightToCopy,
|
memcpy(pcMesh->mBones[i]->mWeights, weightToCopy,
|
||||||
sizeof(aiVertexWeight) * newWeights[i].size());
|
sizeof(aiVertexWeight) * newWeights[i].size());
|
||||||
delete[] newWeights;
|
|
||||||
} else {
|
} else {
|
||||||
pcMesh->mBones[i]->mWeights = NULL;
|
pcMesh->mBones[i]->mWeights = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
delete[] newWeights;
|
||||||
|
|
||||||
// delete the old members
|
// delete the old members
|
||||||
delete[] pcMesh->mVertices;
|
delete[] pcMesh->mVertices;
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
//
|
||||||
|
// Created by wise on 9/24/16.
|
||||||
|
//
|
||||||
|
|
Loading…
Reference in New Issue