Skip to content

Commit

Permalink
Merge topic 'null-axis-guard'
Browse files Browse the repository at this point in the history
3a62d26 Add guards for null XAxis and YAxis.

Acked-by: Kitware Robot <[email protected]>
Reviewed-by: Allison Vacanti <[email protected]>
Acked-by: Shawn Waldon <[email protected]>
Merge-request: !3589
  • Loading branch information
cquammen authored and kwrobot committed Nov 17, 2017
2 parents d7e4612 + 3a62d26 commit 3124db7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Charts/Core/vtkControlPointsItem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ void vtkControlPointsItem::TransformScreenToData(const vtkVector2f& in, vtkVecto
out.SetX(static_cast<float>((out.GetX() / ss[2]) - ss[0]));
out.SetY(static_cast<float>((out.GetY() / ss[3]) - ss[1]));

const bool logX = this->GetXAxis()->GetLogScaleActive();
const bool logY = this->GetYAxis()->GetLogScaleActive();
const bool logX = this->GetXAxis() && this->GetXAxis()->GetLogScaleActive();
const bool logY = this->GetYAxis() && this->GetYAxis()->GetLogScaleActive();

if (logX)
{
Expand All @@ -383,8 +383,8 @@ void vtkControlPointsItem::TransformDataToScreen(const vtkVector2f& in, vtkVecto
{
out = in;

const bool logX = this->GetXAxis()->GetLogScaleActive();
const bool logY = this->GetYAxis()->GetLogScaleActive();
const bool logX = this->GetXAxis() && this->GetXAxis()->GetLogScaleActive();
const bool logY = this->GetYAxis() && this->GetYAxis()->GetLogScaleActive();

if (logX)
{
Expand Down

0 comments on commit 3124db7

Please sign in to comment.