]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix a bug
authorapo <apo@opencascade.com>
Thu, 13 Oct 2005 15:34:37 +0000 (15:34 +0000)
committerapo <apo@opencascade.com>
Thu, 13 Oct 2005 15:34:37 +0000 (15:34 +0000)
src/PIPELINE/VISU_Extractor.cxx

index fa36cd8e3173c6b0a418df4561e1e783d55e3935..6b182da22977a6e9fe77db9a7599890de02cfb20 100644 (file)
@@ -66,7 +66,7 @@ execute(int theNbElems,
   vtkDataArray* aFieldArray = theInputData->GetArray("VISU_FIELD");
   if(vtkFloatArray *aFloatArray = dynamic_cast<vtkFloatArray*>(aFieldArray)){
     int aNbComp = aFloatArray->GetNumberOfComponents();
-    std::vector<float> anArray(aNbComp);
+    std::vector<float> anArray(aNbComp < 3? 3: aNbComp);
     //
     vtkFloatArray *aScalars = vtkFloatArray::New();
     aScalars->SetNumberOfTuples(theNbElems);