From: H.G. Muller Date: Sat, 27 Aug 2011 19:15:00 +0000 (+0200) Subject: Fix crash on typing non-existent enginein Load Engine dialog X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=84d09d38bf04f4d3a5caadb5ab6067b4e117829a;p=xboard.git Fix crash on typing non-existent enginein Load Engine dialog --- diff --git a/backend.c b/backend.c index f4ac7f9..9a06885 100644 --- a/backend.c +++ b/backend.c @@ -888,7 +888,7 @@ void Load(ChessProgramState *cps, int i) { char *p, *q, buf[MSG_SIZ], command[MSG_SIZ], buf2[MSG_SIZ]; - if(engineLine[0]) { // an engine was selected from the combo box + if(engineLine && engineLine[0]) { // an engine was selected from the combo box snprintf(buf, MSG_SIZ, "-fcp %s", engineLine); SwapEngines(i); // kludge to parse -f* / -first* like it is -s* / -second* ParseArgsFromString(resetOptions); appData.fenOverride[0] = NULL;