Fixed dangling pointer access. Fixes #277.

This commit is contained in:
Leonardo Zide 2018-11-05 14:37:01 -08:00
parent a10d1c1727
commit 7bb791e3eb

View file

@ -103,11 +103,11 @@ void lcApplication::SetProject(Project* Project)
{
SaveTabLayout();
gMainWindow->RemoveAllModelTabs();
delete mProject;
mProject = Project;
gMainWindow->RemoveAllModelTabs();
Project->SetActiveModel(0);
lcGetPiecesLibrary()->RemoveTemporaryPieces();