Salome HOME
0021811: EDF BLSURFPLUGIN GHS3DPLUGIN: If dump is not historical, dump of hypothesis...
authoreap <eap@opencascade.com>
Tue, 28 Aug 2012 09:01:35 +0000 (09:01 +0000)
committereap <eap@opencascade.com>
Tue, 28 Aug 2012 09:01:35 +0000 (09:01 +0000)
Fix SIGSEGV on Mandriva2010-32bits

+    double ValTab[] = {0.0};

-      GmfSetLin(idxSol, GmfSolAtVertices, 0.0);
+      GmfSetLin(idxSol, GmfSolAtVertices, ValTab);

src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx

index 43d0a4a0789490f608dae3f71e4592ab5754ea6b..9f2737b65454f4045b4215bf6a19080e1e2cb590 100644 (file)
@@ -1823,13 +1823,14 @@ static bool writeGMFFile(const char*                                     theMesh
       return false;
     }
     int TypTab[] = {GmfSca};
+    double ValTab[] = {0.0};
     GmfSetKwd(idxRequired, GmfVertices, requiredNodes + solSize);
     GmfSetKwd(idxSol, GmfSolAtVertices, requiredNodes + solSize, 1, TypTab);
 //     int usedEnforcedNodes = 0;
 //     std::string gn = "";
     for (ghs3dNodeIt = theRequiredNodes.begin();ghs3dNodeIt != theRequiredNodes.end();++ghs3dNodeIt) {
       GmfSetLin(idxRequired, GmfVertices, (*ghs3dNodeIt)->X(), (*ghs3dNodeIt)->Y(), (*ghs3dNodeIt)->Z(), dummyint);
-      GmfSetLin(idxSol, GmfSolAtVertices, 0.0);
+      GmfSetLin(idxSol, GmfSolAtVertices, ValTab);
       if (theEnforcedNodes.find((*ghs3dNodeIt)) != theEnforcedNodes.end())
         gn = theEnforcedNodes.find((*ghs3dNodeIt))->second;
       aNodeGroupByGhs3dId[usedEnforcedNodes] = gn;