From 15b0e7caab087942ecd7d4fc1a0e436eff4fa618 Mon Sep 17 00:00:00 2001 From: stv Date: Mon, 30 May 2005 09:05:26 +0000 Subject: [PATCH] no message --- src/SalomeApp/SalomeApp_Study.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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(); } -- 2.39.2