]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
Fix crash of Salome in case of reading GMF files.
authorgdd <gdd>
Thu, 12 May 2011 15:32:46 +0000 (15:32 +0000)
committergdd <gdd>
Thu, 12 May 2011 15:32:46 +0000 (15:32 +0000)
src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx

index 6a7df364cac2503829f6a5d0c5bd6f609e0109d7..c7d3fdc1756b377912a31928bba3a08116995c75 100644 (file)
@@ -1280,7 +1280,7 @@ static bool readGMFFile(const char*                     theFile,
         case GmfEdges:
           if (fullyCreatedElement) {
             aCreatedElem = theHelper->AddEdge( node[0], node[1], /*id =*/0, /*force3d =*/false );
-            if (!anEdgeGroupByGhs3dId[iElem].empty())
+            if (anEdgeGroupByGhs3dId.size() && !anEdgeGroupByGhs3dId[iElem].empty())
               updateMeshGroups(theHelper->GetMesh(), aCreatedElem, anEdgeGroupByGhs3dId[iElem]);
           }
           break;
@@ -1289,7 +1289,7 @@ static bool readGMFFile(const char*                     theFile,
             aCreatedElem = theHelper->AddFace( node[0], node[1], node[2], /*id =*/0, /*force3d =*/false );
             for ( int iRef = 0; iRef < nbRef; iRef++ )
               nodeAssigne[ nodeID[ iRef ]] = 1;
-            if (!aFaceGroupByGhs3dId[iElem].empty())
+            if (aFaceGroupByGhs3dId.size() && !aFaceGroupByGhs3dId[iElem].empty())
               updateMeshGroups(theHelper->GetMesh(), aCreatedElem, aFaceGroupByGhs3dId[iElem]);
           }
           break;