]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix crash during GetStudy() for SObject.
authorrnv <rnv@opencascade.com>
Thu, 19 Jan 2017 16:34:04 +0000 (19:34 +0300)
committerrnv <rnv@opencascade.com>
Thu, 19 Jan 2017 16:34:04 +0000 (19:34 +0300)
src/SALOMEDS/SALOMEDS_Study.cxx

index 3fb21699decfa7abac0288a51515edad4c7eabfe..c197b66a67d8fc7fa895162c332a1dedfcff48fd 100644 (file)
@@ -977,7 +977,9 @@ SALOMEDS::Study_ptr SALOMEDS_Study::GetStudy()
       SALOME_NamingService* namingService = KERNEL::getNamingService();
       CORBA::Object_var obj = namingService->Resolve("/Study");
       aStudy = SALOMEDS::Study::_narrow(obj);
-      _local_impl->SetTransientReference(_orb->object_to_string(aStudy));
+      if( !CORBA::is_nil( aStudy ) )  { 
+        _local_impl->SetTransientReference(_orb->object_to_string(aStudy));
+      }
     }
     _corba_impl = SALOMEDS::Study::_duplicate(aStudy);
     return aStudy._retn();