]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix a crash when changing scalar field of ScalarMaponDeformedShape presentation to...
authorapo <apo@opencascade.com>
Thu, 10 May 2007 11:48:40 +0000 (11:48 +0000)
committerapo <apo@opencascade.com>
Thu, 10 May 2007 11:48:40 +0000 (11:48 +0000)
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc

index 0b713f68462dfdc1d446be00b7f51e7bdd0c3726..a3f960b6cd73c30039c8ea7af871af302cdc1ef9 100644 (file)
@@ -183,11 +183,13 @@ void VISU::ScalarMapOnDeformedShape_i::SetTitle(const char* theTitle)
   std::strstream aStream;
   const VISU::TValField& aValField = myScalarField->myValField;
   const VISU::PValForTime aValForTime = aValField.find(myScalarIteration)->second;
-  aStream<<theTitle<<" "<<VISU_Convertor::GenerateName(aValForTime->myTime)<<std::ends;
-  std::string aScalarBarTitle = aStream.str();
-  if(myTitle != theTitle || myScalarBarTitle != aScalarBarTitle){
-    myScalarBarTitle = aScalarBarTitle;
-    myTitle = theTitle;
+  if(aValForTime){
+    aStream<<theTitle<<" "<<VISU_Convertor::GenerateName(aValForTime->myTime)<<std::ends;
+    std::string aScalarBarTitle = aStream.str();
+    if(myTitle != theTitle || myScalarBarTitle != aScalarBarTitle){
+      myScalarBarTitle = aScalarBarTitle;
+      myTitle = theTitle;
+    }
   }
 }