From f0c7c9ce234f6788afa50ce9999de391a7d66bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Teuli=C3=A8re?= Date: Thu, 26 Jan 2012 22:04:00 +0100 Subject: [PATCH] Fixed a potential division by zero. --- qt/history_widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/history_widget.cpp b/qt/history_widget.cpp index 0131b06..1a93594 100644 --- a/qt/history_widget.cpp +++ b/qt/history_widget.cpp @@ -160,7 +160,7 @@ void HistoryWidget::updateModel() if (m_forPlayer) { m_model->setData(m_model->index(rowNum, 5), totalScore); - if (!m_isFreeGame) + if (!m_isFreeGame && gameScore != 0) { int percentage = totalScore * 100 / gameScore; m_model->setData(m_model->index(rowNum, 6),