From: stv Date: Mon, 30 May 2005 09:05:26 +0000 (+0000) Subject: no message X-Git-Tag: T3_0_0_a1~83 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=15b0e7caab087942ecd7d4fc1a0e436eff4fa618;p=modules%2Fgui.git no message --- diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index bd38efc32..7b3be6549 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -14,12 +14,11 @@ SalomeApp_Study::SalomeApp_Study( SUIT_Application* app ) : CAM_Study( app ) -{} - +{ +} SalomeApp_Study::~SalomeApp_Study() { - closeDocument(); } int SalomeApp_Study::id() const @@ -188,9 +187,13 @@ void SalomeApp_Study::closeDocument() emit closed( this ); // close SALOMEDS document - SalomeApp_Application::studyMgr()->Close( studyDS() ); - SALOMEDSClient_Study* aStudy = NULL; - setStudyDS( _PTR(Study)(aStudy) ); + _PTR(Study) st = studyDS(); + if ( st.get() ) + { + SalomeApp_Application::studyMgr()->Close( st ); + SALOMEDSClient_Study* aStudy = 0; + setStudyDS( _PTR(Study)(aStudy) ); + } CAM_Study::closeDocument(); }