From a6cb149215f419331165e3f8e484bcc492e7b9b1 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 2 Jan 2012 23:46:18 +0100 Subject: [PATCH] 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. --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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"; -- 1.7.0.4