From 9c5b0d0d616615fd2ad9c34e69f24dcbf0d76543 Mon Sep 17 00:00:00 2001 From: mpa Date: Fri, 30 Dec 2016 17:42:19 +0300 Subject: [PATCH] fix problem with clear study by GUI --- src/SALOMEDS/SALOMEDS_Study.cxx | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/SALOMEDS/SALOMEDS_Study.cxx b/src/SALOMEDS/SALOMEDS_Study.cxx index 8b14dd003..a23708898 100644 --- a/src/SALOMEDS/SALOMEDS_Study.cxx +++ b/src/SALOMEDS/SALOMEDS_Study.cxx @@ -107,22 +107,18 @@ void SALOMEDS_Study::InitORB() void SALOMEDS_Study::Init() { - if (_isLocal) { - SALOMEDS::Locker lock; - _local_impl->Init(); - } - else - _corba_impl->Init(); + if(CORBA::is_nil(_corba_impl)) + return; + + _corba_impl->Init(); } void SALOMEDS_Study::Clear() { - if (_isLocal) { - SALOMEDS::Locker lock; - _local_impl->Clear(); - } - else - _corba_impl->Clear(); + if(CORBA::is_nil(_corba_impl)) + return; + + _corba_impl->Clear(); } bool SALOMEDS_Study::Open(const std::string& theStudyUrl) -- 2.39.2