[gnome-chess] ChessGame: do not complete move if game is over



commit f32dcec4d95ac6bc86500c1c40c1f7ea963f994f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Wed Jun 25 15:15:17 2014 -0500

    ChessGame: do not complete move if game is over
    
    Fixes clock unpausing when using Undo after gnuchess has decided to
    report a move but before it has actually done so (which is no longer
    possible after the previous commit, anyway)

 lib/chess-game.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/lib/chess-game.vala b/lib/chess-game.vala
index b994de2..fc59824 100644
--- a/lib/chess-game.vala
+++ b/lib/chess-game.vala
@@ -169,6 +169,9 @@ public class ChessGame : Object
         if (hold_count > 0)
             return;
 
+        if (!is_started)
+            return;
+
         ChessRule rule;
         var result = current_state.get_result (out rule);
         if (result != ChessResult.IN_PROGRESS)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]