fix quit during ai turn

fixes up https://github.com/wesnoth/wesnoth/commit/a65752a67696290c6f8a0e96c1b38c37c71535f5