Clear placeholder model mesh. Fixes #586.

This commit is contained in:
Leonardo Zide 2021-01-01 14:28:08 -08:00
parent 2e2b1f0bb5
commit 3d77537408

View file

@ -59,6 +59,8 @@ void PieceInfo::SetModel(lcModel* Model, bool UpdateMesh, Project* CurrentProjec
{ {
mType = lcPieceInfoType::Model; mType = lcPieceInfoType::Model;
mModel = Model; mModel = Model;
delete mMesh;
mMesh = nullptr;
} }
strncpy(mFileName, Model->GetProperties().mFileName.toLatin1().data(), sizeof(mFileName) - 1); strncpy(mFileName, Model->GetProperties().mFileName.toLatin1().data(), sizeof(mFileName) - 1);