Fixed memory leak.

This commit is contained in:
Leonardo Zide 2020-10-11 17:29:32 -07:00
parent 8dad9dd269
commit 28437d16f7

View file

@ -163,6 +163,7 @@ bool lcPreviewWidget::SetCurrentPiece(const QString& PartType, int ColorCode)
void lcPreviewWidget::ClearPreview()
{
delete mLoader;
mLoader = new Project(true/*IsPreview*/);
mLoader->SetActiveModel(0);
mModel = mLoader->GetActiveModel();