From: H.G. Muller Date: Mon, 2 Jan 2012 22:46:18 +0000 (+0100) Subject: Fix crash at match end X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=a6cb149215f419331165e3f8e484bcc492e7b9b1;p=xboard.git Fix crash at match end The -afterTourney option had broken old-style matches, because the ranking string that was tested for "busy" is not set there at all, and remains a NULL pointer, which strcmp doesn't like. --- diff --git a/backend.c b/backend.c index f59096c..a3b0f0c 100644 --- a/backend.c +++ b/backend.c @@ -10492,7 +10492,7 @@ GameEnds(result, resultDetails, whosays) first.matchWins, second.matchWins, appData.matchGames - (first.matchWins + second.matchWins)); if(!appData.tourneyFile[0]) matchGame++, DisplayTwoMachinesTitle(); // [HGM] update result in window title - if(strcmp(ranking, "busy") && appData.afterTourney && appData.afterTourney[0]) RunCommand(appData.afterTourney); + if(ranking && strcmp(ranking, "busy") && appData.afterTourney && appData.afterTourney[0]) RunCommand(appData.afterTourney); popupRequested++; // [HGM] crash: postpone to after resetting endingGame if (appData.firstPlaysBlack) { // [HGM] match: back to original for next match first.twoMachinesColor = "black\n";