Salome HOME
Update version to 3.2.0a1
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_AttributeOpened.cxx
index 7424a749871e9f38a93b890c6acc8ee69637ee12..a2c82dd8116ce67af36c5b36ae6ff9f6fa251ba7 100644 (file)
@@ -22,6 +22,7 @@
 //  Module : SALOME
 
 #include "SALOMEDS_AttributeOpened.hxx"
+#include "SALOMEDS.hxx"
 
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
@@ -40,13 +41,19 @@ SALOMEDS_AttributeOpened::~SALOMEDS_AttributeOpened()
 bool SALOMEDS_AttributeOpened::IsOpened()
 {
   bool aValue;
-  if(_isLocal) aValue = (bool)Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_local_impl)->IsOpened();
+  if (_isLocal) {
+    SALOMEDS::Locker lock; 
+    aValue = (bool)Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_local_impl)->IsOpened();
+  }
   else aValue = SALOMEDS::AttributeOpened::_narrow(_corba_impl)->IsOpened();
   return aValue;
 }
+
 void SALOMEDS_AttributeOpened::SetOpened(bool value)
 {
-  if(_isLocal) Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_local_impl)->SetOpened((int)value);
+  if (_isLocal) {
+    SALOMEDS::Locker lock; 
+    Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_local_impl)->SetOpened((int)value);
+  }
   else SALOMEDS::AttributeOpened::_narrow(_corba_impl)->SetOpened(value);
 }