]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020788: EDF 1339 SMESH : Crash after enabling "Auto Color" feature in attached MED...
authordmv <dmv@opencascade.com>
Mon, 22 Mar 2010 12:17:15 +0000 (12:17 +0000)
committerdmv <dmv@opencascade.com>
Mon, 22 Mar 2010 12:17:15 +0000 (12:17 +0000)
src/SMESHGUI/SMESHGUI.cxx

index 602de94d9113d8627de583d65dc5f973ed939954..bf3c50270c68b4a61b685b5e1ce906c4ffaacfce 100644 (file)
       aReservedColors.append( aColor );
 
       _PTR(SObject) aGroupSObject = SMESH::FindSObject(aGroupObject);
-      if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str()))
-      {
-        if( aGroupObject->GetType() == SMESH::NODE )
-          anActor->SetNodeColor( aColor.R, aColor.G, aColor.B );
-        else if( aGroupObject->GetType() == SMESH::EDGE )
-          anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
-        else
-          anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
+      if (aGroupSObject) {
+        if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str())) {
+          if( aGroupObject->GetType() == SMESH::NODE )
+            anActor->SetNodeColor( aColor.R, aColor.G, aColor.B );
+          else if( aGroupObject->GetType() == SMESH::EDGE )
+            anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
+          else
+            anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
+        }
       }
     }