From 1ee1b504ff2988880a512752834517f950cf615a Mon Sep 17 00:00:00 2001 From: buliabyak Date: Sun, 15 Jul 2007 14:49:36 +0000 Subject: [PATCH] fix crash with empty parameter string --- src/extension/parameter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/extension/parameter.cpp b/src/extension/parameter.cpp index b35052a0e..f59a5cc3d 100644 --- a/src/extension/parameter.cpp +++ b/src/extension/parameter.cpp @@ -917,6 +917,9 @@ ParamFloat::string (void) Glib::ustring * ParamString::string (void) { + if (_value == NULL) + return new Glib::ustring(""); + // FIXME: I think the string should NOT be escaped. Just put between "..." // Otherwise \frac{1}{2} will become \\frac{1}{2} and then the LaTeX effect won't work.... //gchar * esc = g_strescape(_value, NULL); -- 2.30.2