Skip to content

Commit

Permalink
Gui: Free NavigationStyle before scenegraph
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexbas committed Sep 4, 2023
1 parent 331b764 commit 6c33c91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Gui/View3DInventorViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ View3DInventorViewer::~View3DInventorViewer()
// to prevent following OpenGL error message: "Texture is not valid in the current context. Texture has not been destroyed"
aboutToDestroyGLContext();

delete this->navigation;

// It can happen that a document has several MDI views and when the about to be
// closed 3D view is in edit mode the corresponding view provider must be restored
// because otherwise it might be left in a broken state
Expand Down Expand Up @@ -589,8 +591,6 @@ View3DInventorViewer::~View3DInventorViewer()
if (this->pcClipPlane)
this->pcClipPlane->unref();

delete this->navigation;

// Note: When closing the application the main window doesn't exist any more.
if (getMainWindow())
getMainWindow()->setPaneText(2, QLatin1String(""));
Expand Down

0 comments on commit 6c33c91

Please sign in to comment.