[gnome-chess] Game: Stop should be no-op if already stopped



commit 19baf0f96daba8db15f1e6697265c56b68ba150a
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Oct 13 12:25:14 2013 -0500

    Game: Stop should be no-op if already stopped
    
    We're stopping multiple times in a row.  game_end_cb is followed by
    engine_stopped_cb, causing "Oops! Something has gone wrong!"
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710028

 src/chess-game.vala |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/chess-game.vala b/src/chess-game.vala
index e609630..21c41af 100644
--- a/src/chess-game.vala
+++ b/src/chess-game.vala
@@ -1542,6 +1542,8 @@ public class ChessGame
 
     public void stop (ChessResult result, ChessRule rule)
     {
+        if (!is_started)
+            return;
         this.result = result;
         this.rule = rule;
         is_started = false;


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