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



commit 8c8be27de73768a93d6f3cdae83ee54837d627fb
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]