]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Verification if ( !aSeq.IsNull() ) added before aLength = aSeq->Length(); string...
authorsln <sln@opencascade.com>
Wed, 24 Aug 2005 13:40:39 +0000 (13:40 +0000)
committersln <sln@opencascade.com>
Wed, 24 Aug 2005 13:40:39 +0000 (13:40 +0000)
src/SALOMEDS/SALOMEDS_Study.cxx

index 1cd52e9556ae6dc3cb6b1f79b1b8d21fd17a2008..4f202bad9770eb5067eaaf82ff560d329c465915 100644 (file)
@@ -442,9 +442,13 @@ std::vector<_PTR(SObject)> SALOMEDS_Study::FindDependances(const _PTR(SObject)&
   int aLength, i;
   if(_isLocal) {
     Handle(TColStd_HSequenceOfTransient) aSeq = _local_impl->FindDependances(aSO->GetLocalImpl());
-    aLength = aSeq->Length();
-    for(i=1; i<=aLength; i++) 
-      aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(Handle(SALOMEDSImpl_SObject)::DownCast(aSeq->Value(i)))));
+    if ( !aSeq.IsNull() )
+    {
+      aLength = aSeq->Length();
+      for(i=1; i<=aLength; i++) 
+        aVector.push_back(_PTR(SObject)(
+          new SALOMEDS_SObject(Handle(SALOMEDSImpl_SObject)::DownCast(aSeq->Value(i)))));
+    }
   }
   else {
     SALOMEDS::Study::ListOfSObject_var aSeq = _corba_impl->FindDependances(aSO->GetCORBAImpl());