mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 00:07:24 +00:00
Merge pull request #1349 from lvk88/meshlab-780-fix-crash-when-closing-project-window
Meshlab #780: fix crash when closing project window
This commit is contained in:
commit
f1c5efa33c
@ -1811,7 +1811,10 @@ void MainWindow::newProject(const QString& projName)
|
||||
{
|
||||
if (gpumeminfo == NULL)
|
||||
return;
|
||||
MultiViewer_Container *mvcont = new MultiViewer_Container(*gpumeminfo,mwsettings.highprecision,mwsettings.perbatchprimitives,mwsettings.minpolygonpersmoothrendering,mdiarea);
|
||||
|
||||
// The parent of mvcont is set to null, because mdiarea->addSubWindow
|
||||
// will put it into a QMDISubWindow that will take ownership
|
||||
MultiViewer_Container *mvcont = new MultiViewer_Container(*gpumeminfo,mwsettings.highprecision,mwsettings.perbatchprimitives,mwsettings.minpolygonpersmoothrendering,nullptr);
|
||||
connect(&mvcont->meshDoc,SIGNAL(meshAdded(int)),this,SLOT(meshAdded(int)));
|
||||
connect(&mvcont->meshDoc,SIGNAL(meshRemoved(int)),this,SLOT(meshRemoved(int)));
|
||||
connect(&mvcont->meshDoc, SIGNAL(documentUpdated()), this, SLOT(documentUpdateRequested()));
|
||||
|
||||
@ -80,7 +80,7 @@ MultiViewer_Container::~MultiViewer_Container()
|
||||
|
||||
//WARNING!!!! Here just the pointer to the MLSceneGLSharedDataContext is destroyed.
|
||||
// The data contained in the GPU gets deallocated in the closeEvent function.
|
||||
delete scenecontext;
|
||||
scenecontext->deleteLater();
|
||||
}
|
||||
|
||||
int MultiViewer_Container::getNextViewerId(){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user