Commit efc66eca authored by David Lonie's avatar David Lonie Committed by Kitware Robot
Browse files

Merge topic 'vtkLookupTable_use_valid_pointer'

17d7c1ef

 Use valid pointer in vtkLookupTable::BuildSpecialColors.

Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1196
parents eac09abf 17d7c1ef
......@@ -292,12 +292,12 @@ void vtkLookupTable::Build()
void vtkLookupTable::BuildSpecialColors()
{
// Add "special" colors (NaN, below range, above range) to table here.
unsigned char *table = this->GetTable()->GetPointer(0);
vtkIdType numberOfColors = this->GetTable()->GetNumberOfTuples();
unsigned char *tptr = table + 4*(numberOfColors + vtkLookupTable::BELOW_RANGE_COLOR_INDEX);
unsigned char color[4];
this->ResizeTableForSpecialColors();
unsigned char *table = this->GetTable()->GetPointer(0);
unsigned char *tptr = table + 4*(numberOfColors + vtkLookupTable::BELOW_RANGE_COLOR_INDEX);
unsigned char color[4];
// Below range color
if (this->GetUseBelowRangeColor() || numberOfColors == 0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment