Fix check for human player in update_headerbar_title

The goal is to print a warning about check if it's the human's turn, but
this would be broken if computer vs. computer games were supported.
This commit is contained in:
Michael Catanzaro 2018-04-24 11:46:35 -05:00
parent 4b314fdbd9
commit 221e06e5e9

View file

@ -1196,8 +1196,8 @@ Copyright © 20152016 Sahil Sareen""";
private void update_headerbar_title ()
{
if ((human_player == null ||
human_player.color == game.current_player.color) &&
if (human_player != null &&
human_player.color == game.current_player.color &&
game.current_state.is_in_check (game.current_player))
{
if (game.current_player.color == Color.WHITE)