From 1bfea127487236c88f2d6115001a7ac1fa43bd8e Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 31 Oct 2014 09:36:11 +0300 Subject: [PATCH] refs #202: segmentation violation when switch between modules Disconnect NewGEOM from the viewer by the module deactivation --- src/NewGeom/NewGeom_SalomeViewer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/NewGeom/NewGeom_SalomeViewer.cpp b/src/NewGeom/NewGeom_SalomeViewer.cpp index a455bc183..fe9cd2310 100644 --- a/src/NewGeom/NewGeom_SalomeViewer.cpp +++ b/src/NewGeom/NewGeom_SalomeViewer.cpp @@ -48,6 +48,9 @@ void NewGeom_SalomeViewer::setSelector(NewGeom_OCCSelector* theSel) return; else { mySelector->viewer()->getViewManager()->disconnect(this); + OCCViewer_Viewer* aViewer = mySelector->viewer(); + if (aViewer) + aViewer->disconnect(this); } } mySelector = theSel; -- 2.39.2