]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
WIP
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Jan 2021 16:17:31 +0000 (17:17 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Jan 2021 16:17:31 +0000 (17:17 +0100)
src/SALOMEDS/SALOMEDS_Driver_i.cxx
src/SALOMEDS/SALOMEDS_Driver_i.hxx
src/SALOMEDS/SALOMEDS_Study_i.cxx

index 04a85cb947a6767b7364ef0e8a5f6c717123a473..c82cc604efdda1094f9a6c4f6a59bbcbd80723d7 100644 (file)
@@ -348,10 +348,11 @@ SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::DumpPython(bool isPublished,
 //                                          SALOMEDS_DriverFactory
 //###############################################################################################################
 
-SALOMEDS_DriverFactory_i::SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB)
+SALOMEDS_DriverFactory_i::SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB, bool isNSAvail)
 {
   _orb = CORBA::ORB::_duplicate(theORB);
-  _name_service = new SALOME_NamingService(_orb);
+  if(isNSAvail)
+    _name_service = new SALOME_NamingService(_orb);
 }
 
 
index 28dc9e3dc76eeffa4b72465140bc81462601c613..3ec27fd16842c3bb5839303138c591f340c6bdfa 100644 (file)
@@ -111,11 +111,11 @@ class SALOMEDS_DriverFactory_i : public virtual SALOMEDSImpl_DriverFactory
 {
 protected:  
   CORBA::ORB_var        _orb;
-  SALOME_NamingService* _name_service;
+  SALOME_NamingService* _name_service = nullptr;
 
 public:
   
-  SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB);
+  SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB, bool isNSAvail = true);
 
   virtual ~SALOMEDS_DriverFactory_i();
    
index 2cc44844811bbe15f2faae3c74a20e3e297220b4..31a2bef460e12c8d939c17b30cb6431b2bd2abc2 100644 (file)
@@ -297,7 +297,7 @@ SALOMEDS_Study_i::SALOMEDS_Study_i(CORBA::ORB_ptr orb, SALOME::Session_ptr sessi
 {
   _orb     = CORBA::ORB::_duplicate(orb);
   _impl    = new SALOMEDSImpl_Study();
-  _factory = new SALOMEDS_DriverFactory_i(_orb);
+  _factory = new SALOMEDS_DriverFactory_i(_orb,!CORBA::is_nil(session));
   _closed  = true;
 
   Init(session);