Skip to content

Commit

Permalink
Pendulum 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 bd73f05 commit b9a578a
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -138,6 +138,8 @@ PendulumWindowWindow::~PendulumWindowWindow()

delete mZincContext;

mZincWidget = nullptr;

delete mTimeValues;

// Delete the GUI
Expand All @@ -158,6 +160,13 @@ void PendulumWindowWindow::retranslateUi()

void PendulumWindowWindow::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 b9a578a

Please sign in to comment.