Assert that the ChessEngine has been stopped before it is destroyed

https://bugzilla.gnome.org/show_bug.cgi?id=724504
This commit is contained in:
Michael Catanzaro 2015-07-20 13:44:00 -05:00
parent 6d4be6567f
commit 48202d6672

View file

@ -58,6 +58,11 @@ public abstract class ChessEngine : Object
this.delay_seconds = delay_seconds;
}
~ChessEngine ()
{
assert(!started);
}
public bool start ()
requires (pid == 0)
requires (child_watch_id == 0)