Give error popup when pairing engine fails
authorH.G. Muller <h.g.muller@hccnet.nl>
Wed, 8 Jun 2011 15:27:01 +0000 (17:27 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Wed, 8 Jun 2011 16:09:23 +0000 (18:09 +0200)
An invalid pairing now produces an error popup to inform the user, so he
knows why the tourney stagnates.

backend.c

index 9ba38f3..6238eeb 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -7661,7 +7661,10 @@ HandleMachineMove(message, cps)
 
     if(cps == &pairing && sscanf(message, "%d-%d", &savedWhitePlayer, &savedBlackPlayer) == 2) {
        // [HGM] pairing: Mega-hack! Pairing engine also uses this routine (so it could give other WB commands).
-       if(savedWhitePlayer == 0 || savedBlackPlayer == 0) return;
+       if(savedWhitePlayer == 0 || savedBlackPlayer == 0) {
+           DisplayError(_("Invalid pairing from pairing engine"), 0);
+           return;
+       }
        pairingReceived = 1;
        NextMatchGame();
        return; // Skim the pairing messages here.