From 061d3eebf7a0502afcd9c1831d67c8961feece8d Mon Sep 17 00:00:00 2001 From: John McKernan Date: Fri, 1 May 2009 13:41:26 -0700 Subject: Sun bug #1237023: Dtterm crashes in XtDisplayAccelerators() Don't try to printf if returned string is NULL Signed-off-by: Alan Coopersmith --- src/TMprint.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/TMprint.c b/src/TMprint.c index 7b7bde2..aeb6b30 100644 --- a/src/TMprint.c +++ b/src/TMprint.c @@ -729,8 +729,10 @@ void _XtDisplayTranslations( widget->core.tm.translations, NULL, True); - printf("%s\n",xString); - XtFree(xString); + if (xString) { + printf("%s\n",xString); + XtFree(xString); + } } /*ARGSUSED*/ @@ -747,8 +749,10 @@ void _XtDisplayAccelerators( widget->core.accelerators, NULL, True); - printf("%s\n",xString); - XtFree(xString); + if (xString) { + printf("%s\n",xString); + XtFree(xString); + } } /*ARGSUSED*/ -- cgit v1.2.3