IPAL54097: SIGSEGV in Scalar Bar Properties dialog and crash in next operation

This commit is contained in:
eap 2017-04-24 17:17:28 +03:00 committed by rnv
parent 3ac75b1234
commit 417aadaeea

View File

@ -578,15 +578,18 @@ int SMESH_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
// rnv begin // rnv begin
// Customization of the vtkScalarBarActor to show distribution histogram. // Customization of the vtkScalarBarActor to show distribution histogram.
if(myDistributionColoringType == SMESH_MULTICOLOR_TYPE && GetDistributionVisibility() && distrVisibility) if ( myDistributionColoringType == SMESH_MULTICOLOR_TYPE &&
{ GetDistributionVisibility() &&
rgb = distColors->GetPointer(3*dcCount); //write into array directly distrVisibility &&
rgb[0] = rgba[0]; myNbValues[i] > 0 )
rgb[1] = rgba[1]; {
rgb[2] = rgba[2]; rgb = distColors->GetPointer(3*dcCount); //write into array directly
dcCount++; rgb[0] = rgba[0];
} rgb[1] = rgba[1];
rgb[2] = rgba[2];
dcCount++;
} }
}
// Now position everything properly // Now position everything properly
// //