From: H.G. Muller Date: Sat, 13 Oct 2012 05:01:05 +0000 (+0200) Subject: Fix segfault on faulty command-line option X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=89765faf3da5d11d2113bdf25ef13f936d118589;p=xboard.git Fix segfault on faulty command-line option --- diff --git a/dialogs.c b/dialogs.c index a720a9f..a826a37 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1825,10 +1825,12 @@ DisplayFatalError (String message, int error, int status) snprintf(buf, sizeof(buf), "%s: %s", message, strerror(error)); message = buf; } - if (appData.popupExitMessage && boardWidget && XtIsRealized(boardWidget)) { - ErrorPopUp(status ? _("Fatal Error") : _("Exiting"), message, TRUE); - } else { - ExitEvent(status); + if(mainOptions[W_BOARD].handle) { + if (appData.popupExitMessage) { + ErrorPopUp(status ? _("Fatal Error") : _("Exiting"), message, TRUE); + } else { + ExitEvent(status); + } } }