From 5d32344e18d19345b67fad5f78bf5634daef6345 Mon Sep 17 00:00:00 2001 From: "David C. Lonie" Date: Wed, 8 Oct 2014 13:46:10 -0400 Subject: [PATCH] Don't attempt to render NULL strings. Change-Id: I54a664d7c4b0dc8824a099b035e26872f0b6fa7f --- Rendering/GL2PS/vtkGL2PSUtilities.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Rendering/GL2PS/vtkGL2PSUtilities.cxx b/Rendering/GL2PS/vtkGL2PSUtilities.cxx index 685b28871a0..8d3c8463b5b 100644 --- a/Rendering/GL2PS/vtkGL2PSUtilities.cxx +++ b/Rendering/GL2PS/vtkGL2PSUtilities.cxx @@ -44,6 +44,11 @@ float vtkGL2PSUtilities::LineWidthFactor = 5.f / 7.f; void vtkGL2PSUtilities::DrawString(const char *str, vtkTextProperty *tprop, double pos[]) { + if (!str) + { + return; + } + vtkTextRenderer *tren(vtkTextRenderer::GetInstance()); if (tren == NULL) {