From 6041221c6d2892c6e7a61570c524fd090f447739 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 21 May 2003 17:04:59 +0000 Subject: Fix to prevent division by 0 from Mark Hsu --- (limited to 'noncore') diff --git a/noncore/settings/netsystemtime/predicttabwidget.cpp b/noncore/settings/netsystemtime/predicttabwidget.cpp index 8dc889f..a9fe418 100644 --- a/noncore/settings/netsystemtime/predicttabwidget.cpp +++ b/noncore/settings/netsystemtime/predicttabwidget.cpp @@ -120,7 +120,8 @@ PredictTabWidget::PredictTabWidget( QWidget *parent ) tblLookups->setText( i, 2, QString::number( shift ) ); tblLookups->setText( i, 1, QString::number( last / ( 60 * 60 ) ) ); } - _shiftPerSec /= lookupCount; + if(lookupCount) + _shiftPerSec /= lookupCount; QString drift = QString::number( _shiftPerSec * 60 * 60); drift.append( tr( " s/h" ) ); lblDrift->setText( drift ); -- cgit v0.9.0.2