]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
fix bug with locked mutex
authormpa <mpa@opencascade.com>
Wed, 8 Feb 2017 09:43:12 +0000 (12:43 +0300)
committermpa <mpa@opencascade.com>
Wed, 8 Feb 2017 09:43:12 +0000 (12:43 +0300)
src/DF/DF_Document.cxx
src/SALOMEDS/SALOMEDS_Study_i.cxx

index 36a884e2df238543c7aab14982fbad50e0f7223b..d47b7dfc49ddd6ae6fb0df76809d6a28756963ab 100644 (file)
@@ -29,7 +29,7 @@ DF_Document::DF_Document(const std::string& theDocumentType)
 {
   _id = -1;
   _type = theDocumentType;
-  _modified = true;
+  _modified = false;
 }
 
 DF_Document::~DF_Document()
index cd586ec2f80023d78afc04392e2afcadf5bd4b98..1ac5ee0a3123f6eafcf71cd408c019e6745d09b1 100644 (file)
@@ -259,12 +259,14 @@ SALOMEDS_Study_i::~SALOMEDS_Study_i()
 //============================================================================
 void SALOMEDS_Study_i::Init()
 {
-  if ( !_impl->GetDocument() )
-    _impl->Init();
-
   if (!_closed)
     throw SALOMEDS::Study::StudyInvalidReference();
 
+  SALOMEDS::Locker lock;
+  
+  if ( !_impl->GetDocument() )
+    _impl->Init();
+
   _builder        = new SALOMEDS_StudyBuilder_i(_impl->NewBuilder(), _orb);  
   _notifier       = new SALOMEDS::Notifier(_orb);
   _genObjRegister = new SALOMEDS::GenObjRegister(_orb);
@@ -297,9 +299,11 @@ void SALOMEDS_Study_i::Init()
 //============================================================================
 void SALOMEDS_Study_i::Clear()
 {
-  SALOMEDS::Locker lock;
   if (_closed)
     return;
+
+  SALOMEDS::Locker lock;
+
   //delete the builder servant
   PortableServer::POA_var poa=_builder->_default_POA();
   PortableServer::ObjectId_var anObjectId = poa->servant_to_id(_builder);