Commit 8d93f3c1 authored by Dave DeMarle's avatar Dave DeMarle Committed by Code Review
Browse files

Merge topic 'fix-setget-tests-master' into master

8e1311a2 Merge branch 'fix-setget-tests' into fix-setget-tests-master
8e17ee09 Fix set get test.
parents 49ca3b00 8e1311a2
......@@ -639,7 +639,11 @@ void vtkContext2D::ApplyPen(vtkPen *pen)
//-----------------------------------------------------------------------------
vtkPen* vtkContext2D::GetPen()
{
return this->Device->GetPen();
if (this->Device)
{
return this->Device->GetPen();
}
return NULL;
}
//-----------------------------------------------------------------------------
......@@ -651,7 +655,11 @@ void vtkContext2D::ApplyBrush(vtkBrush *brush)
//-----------------------------------------------------------------------------
vtkBrush* vtkContext2D::GetBrush()
{
return this->Device->GetBrush();
if (this->Device)
{
return this->Device->GetBrush();
}
return NULL;
}
//-----------------------------------------------------------------------------
......@@ -663,7 +671,11 @@ void vtkContext2D::ApplyTextProp(vtkTextProperty *prop)
//-----------------------------------------------------------------------------
vtkTextProperty* vtkContext2D::GetTextProp()
{
return this->Device->GetTextProp();
if (this->Device)
{
return this->Device->GetTextProp();
}
return NULL;
}
//-----------------------------------------------------------------------------
......@@ -678,8 +690,12 @@ void vtkContext2D::SetTransform(vtkTransform2D *transform)
//-----------------------------------------------------------------------------
vtkTransform2D* vtkContext2D::GetTransform()
{
this->Device->GetMatrix(this->Transform->GetMatrix());
return this->Transform;
if (this->Device && this->Transform)
{
this->Device->GetMatrix(this->Transform->GetMatrix());
return this->Transform;
}
return NULL;
}
//-----------------------------------------------------------------------------
......
Markdown is supported
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