summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McKernan <john.mckernan@sun.com>2009-05-01 13:41:26 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-05-01 13:41:26 -0700
commit061d3eebf7a0502afcd9c1831d67c8961feece8d (patch)
treef5684f339feb086931bdf383dc1a83816ebebcd6
parente500631954c8d390e8705fde7f50d1acc006406e (diff)
Sun bug #1237023: Dtterm crashes in XtDisplayAccelerators()
Don't try to printf if returned string is NULL Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r--src/TMprint.c12
1 files 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*/