From 71962e580d7ace7956a0264b7410f1b243432d24 Mon Sep 17 00:00:00 2001 From: Frederic Koehler Date: Fri, 28 Sep 2012 14:22:27 -0400 Subject: [PATCH] dtcreate: Avoid trying to reuse closed help window This fixes a segfault when trying to go to help a second time, after closing the first window. --- cde/programs/dtcreate/cmncbs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cde/programs/dtcreate/cmncbs.c b/cde/programs/dtcreate/cmncbs.c index 05a8b11cf..e42cc4e6c 100644 --- a/cde/programs/dtcreate/cmncbs.c +++ b/cde/programs/dtcreate/cmncbs.c @@ -220,6 +220,9 @@ void activateCB_edit_icon (Widget wid, XtPointer client_data, return; } +/* We use this so we can reuse an open help dialog window. */ +static Widget mainHelpDialog = NULL; + /******************************************************************************/ /* */ /* closeCB_mainHelpDialog */ @@ -234,6 +237,7 @@ void closeCB_mainHelpDialog(Widget wid, XtPointer client_data, XtPointer *cbs) { XtDestroyWidget(wid); + mainHelpDialog = NULL; } /******************************************************************************/ @@ -248,7 +252,6 @@ void closeCB_mainHelpDialog(Widget wid, XtPointer client_data, /******************************************************************************/ void DisplayHelpDialog(Widget wid, XtPointer client_data, XtPointer cbs) { - static Widget mainHelpDialog = NULL; Widget parent; int i; Arg args[10];