]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fixed SIGSEGV after execute python command "myStudy.Clear()"
authorimn <imn@opencascade.com>
Thu, 17 Nov 2016 13:35:58 +0000 (16:35 +0300)
committerimn <imn@opencascade.com>
Thu, 17 Nov 2016 13:35:58 +0000 (16:35 +0300)
src/GEOM/GEOM_Engine.cxx

index 1386f6c7794517ce617b38dcd9237be1497059b5..abcd110d65b58b82fb566a49c0caa87dac46921e 100644 (file)
@@ -550,9 +550,14 @@ void GEOM_Engine::Close()
 {
   if (_document) {
     //Remove all GEOM Objects associated to the document
+    TColStd_SequenceOfAsciiString aSeq;
     GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It (_objects);
-    for (; It.More(); It.Next())
-      _objects.UnBind(It.Key());
+    for (; It.More(); It.Next()) {
+      aSeq.Append(It.Key());
+    }
+    for (Standard_Integer i=1; i<=aSeq.Length(); i++) {
+      _objects.UnBind(aSeq.Value(i));
+    }
 
     // Forget free labels for document
     _freeLabels.clear();