Skip to content

Commit

Permalink
Handle case when textDims are NULL
Browse files Browse the repository at this point in the history
Add a NULL pointer check to handle the case when textDims are not provided in
vtkFreeTypeTools::RenderStringInternal().

This fixes a regression introduced in commit 5dcad97.
  • Loading branch information
msmolens committed Apr 27, 2016
1 parent b8c2283 commit bd63a80
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Rendering/FreeType/vtkFreeTypeTools.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1242,8 +1242,11 @@ bool vtkFreeTypeTools::RenderStringInternal(vtkTextProperty *tprop,
if (str.empty())
{
data->Initialize();
textDims[0] = 0;
textDims[1] = 0;
if (textDims)
{
textDims[0] = 0;
textDims[1] = 0;
}
return true;
}

Expand Down

0 comments on commit bd63a80

Please sign in to comment.