From: vsr Date: Thu, 5 Nov 2009 13:43:46 +0000 (+0000) Subject: Issue 0020572: EDF 1150 OCC: SIGSEGV when Salome is closing after execution of a... X-Git-Tag: V5_1_3rc2~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f9ddcec31ac33e3da32c1d0c453a3d38a26c5acb;p=modules%2Fgeom.git Issue 0020572: EDF 1150 OCC: SIGSEGV when Salome is closing after execution of a GEOM script Additional fix for GEOM - avoid undesired servant removal by Destroy() --- diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index 1bb44f33e..926868a41 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -52,6 +52,10 @@ #include #include +//To disable automatic genericobj management, the following line should be commented. +//Otherwise, it should be uncommented. Refer to KERNEL_SRC/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx +//#define WITHGENERICOBJ + //================================================================ // Function : getActiveView // Purpose : Get active view window, returns 0 if no open study frame @@ -833,10 +837,12 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction ) addInStudy( obj, aName.toLatin1().constData() ); // updateView=false display( obj, false ); +#ifdef WITHGENERICOBJ // obj has been published in study. Its refcount has been incremented. // It is safe to decrement its refcount // so that it will be destroyed when the entry in study will be removed obj->Destroy(); +#endif } else { // asv : fix of PAL6454. If publish==false, then the original shape