From: Anthony Geay Date: Wed, 13 Jan 2021 16:17:31 +0000 (+0100) Subject: WIP X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dc8d0a393b5d558800fdca49a52cf57450e42535;p=modules%2Fkernel.git WIP --- diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.cxx b/src/SALOMEDS/SALOMEDS_Driver_i.cxx index 04a85cb94..c82cc604e 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.cxx @@ -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); } diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.hxx b/src/SALOMEDS/SALOMEDS_Driver_i.hxx index 28dc9e3dc..3ec27fd16 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.hxx @@ -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(); diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 2cc448448..31a2bef46 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -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);