From 33a0e73843115ff6d4eacaf963a38f2e8b20b295 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Fri, 15 Jul 2011 11:21:29 -0700 Subject: [PATCH] fixed segfault in xengineoutput --- xengineoutput.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/xengineoutput.c b/xengineoutput.c index 11b0695..3c0921e 100644 --- a/xengineoutput.c +++ b/xengineoutput.c @@ -112,7 +112,7 @@ void SetEngineColorIcon( int which ); Position engineOutputX = -1, engineOutputY = -1; Dimension engineOutputW, engineOutputH; -Widget engineOutputShell; +Widget engineOutputShell = NULL; static int engineOutputDialogUp; /* Module variables */ @@ -161,17 +161,18 @@ static void InitializeEngineOutput() void DoSetWindowText(int which, int field, char *s_label) { - Arg arg; + Arg args[16]; - XtSetArg(arg, XtNlabel, (XtArgVal) s_label); - XtSetValues(outputField[which][field], &arg, 1); + XtSetArg(args[0], XtNlabel, (XtArgVal) s_label); + XtSetValues(outputField[which][field], args, 1); } void SetEngineOutputTitle(char *title) { - Arg arg; - XtSetArg(arg, XtNtitle, (XtArgVal) title); - XtSetValues(engineOutputShell, &arg, 1); + Arg args[16]; + if(engineOutputShell==NULL) return; + XtSetArg(args[0], XtNtitle, (XtArgVal) title); + XtSetValues(engineOutputShell, args, 1); } void InsertIntoMemo( int which, char * text, int where ) -- 1.7.0.4