Skip to content

Commit

Permalink
Zinc window: skip createAndSetZincContext() when closing OpenCOR.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Aug 13, 2020
1 parent 5993f9f commit ee98ba2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/plugins/test/ZincWindow/src/zincwindowwindow.cpp
Expand Up @@ -91,6 +91,8 @@ ZincWindowWindow::~ZincWindowWindow()

delete mZincContext;

mZincWidget = nullptr;

// Delete the GUI

delete mGui;
Expand All @@ -109,6 +111,13 @@ void ZincWindowWindow::retranslateUi()

void ZincWindowWindow::createAndSetZincContext()
{
// Make sure that we still have a Zinc widget (i.e. skip the case where we
// are coming here as a result of closing OpenCOR)

if (mZincWidget == nullptr) {
return;
}

// Keep track of our current scene viewer's description

mZincSceneViewerDescription = mZincWidget->sceneViewer().writeDescription();
Expand Down

0 comments on commit ee98ba2

Please sign in to comment.