From 84d09d38bf04f4d3a5caadb5ab6067b4e117829a Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 27 Aug 2011 21:15:00 +0200 Subject: [PATCH] Fix crash on typing non-existent enginein Load Engine dialog --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.7.0.4