From bd63a80ef8d6081753c8fefc7915f5010b309d2c Mon Sep 17 00:00:00 2001 From: Max Smolens Date: Wed, 27 Apr 2016 09:42:18 -0400 Subject: [PATCH] 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. --- Rendering/FreeType/vtkFreeTypeTools.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Rendering/FreeType/vtkFreeTypeTools.cxx b/Rendering/FreeType/vtkFreeTypeTools.cxx index e071bea9d11..a860d13c7c0 100644 --- a/Rendering/FreeType/vtkFreeTypeTools.cxx +++ b/Rendering/FreeType/vtkFreeTypeTools.cxx @@ -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; }