Fixed a potential division by zero.

This commit is contained in:
Olivier Teulière 2012-01-26 22:04:00 +01:00
parent b6b4958351
commit f0c7c9ce23

View file

@ -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),