Skip to content

Commit bd63a80

Browse files
committed
Handle case when textDims are NULL
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.
1 parent b8c2283 commit bd63a80

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Rendering/FreeType/vtkFreeTypeTools.cxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,8 +1242,11 @@ bool vtkFreeTypeTools::RenderStringInternal(vtkTextProperty *tprop,
12421242
if (str.empty())
12431243
{
12441244
data->Initialize();
1245-
textDims[0] = 0;
1246-
textDims[1] = 0;
1245+
if (textDims)
1246+
{
1247+
textDims[0] = 0;
1248+
textDims[1] = 0;
1249+
}
12471250
return true;
12481251
}
12491252

0 commit comments

Comments
 (0)