From: mpa Date: Wed, 8 Feb 2017 09:43:12 +0000 (+0300) Subject: fix bug with locked mutex X-Git-Tag: Before_python3_27062017~1^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=69d02e30526afb5ec1934c589d42264d643f4935;p=modules%2Fkernel.git fix bug with locked mutex --- diff --git a/src/DF/DF_Document.cxx b/src/DF/DF_Document.cxx index 36a884e2d..d47b7dfc4 100644 --- a/src/DF/DF_Document.cxx +++ b/src/DF/DF_Document.cxx @@ -29,7 +29,7 @@ DF_Document::DF_Document(const std::string& theDocumentType) { _id = -1; _type = theDocumentType; - _modified = true; + _modified = false; } DF_Document::~DF_Document() diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index cd586ec2f..1ac5ee0a3 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -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);