From db4cc393ab1113c23d90d9e5cd2516a62e743e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Teuli=C3=A8re?= Date: Tue, 9 Apr 2013 19:40:15 +0200 Subject: [PATCH] ToppingWidget: disable the widget at the end of the game. This avoids a crash if the players tries to go on playing. --- qt/topping_widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/topping_widget.cpp b/qt/topping_widget.cpp index 01ac865..078c3b2 100644 --- a/qt/topping_widget.cpp +++ b/qt/topping_widget.cpp @@ -149,8 +149,8 @@ void ToppingWidget::refresh() lineEditCoords->clear(); lineEditRack->setEnabled(true); lineEditTotalScore->setText(QString("%1").arg(m_game->getCurrentPlayer().getTotalScore())); - // Do not allow entering a move when displaying an old turn - setEnabled(m_game->isLastTurn()); + // Do not allow entering a move when displaying an old turn or if the game is finished + setEnabled(m_game->isLastTurn() && !m_game->isFinished()); } }