diff options
| author | Mario Lang <mlang@delysid.org> | 2014-04-01 00:02:19 +0200 |
|---|---|---|
| committer | Mario Lang <mlang@delysid.org> | 2014-04-01 00:02:19 +0200 |
| commit | 539d39a0dbcfb3e1d264be20c916f81f1b167a39 (patch) | |
| tree | 2f38557a55e6db7e10bbad18e217f105a18a093a /chess-clock.el | |
| parent | a2409e6364eeefd43060c236107ae43c61cd5f21 (diff) | |
chess-clock-tick-tock: Fix an error on first call.
First time around, chess-clock-last-time is nil.
Diffstat (limited to 'chess-clock.el')
| -rw-r--r-- | chess-clock.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chess-clock.el b/chess-clock.el index 1e5ece0..bf12d43 100644 --- a/chess-clock.el +++ b/chess-clock.el @@ -87,7 +87,8 @@ (chess-game-inhibit-events t) counter) (setq chess-clock-last-time (current-time)) - (when (and (> (chess-game-index chess-module-game) 0) + (when (and last-time + (> (chess-game-index chess-module-game) 0) (not (chess-game-status chess-module-game))) (if (chess-pos-side-to-move (chess-game-pos chess-module-game)) (setq counter 'white-remaining) |
