[Jahshaka-cvs] jah/jahwidgets/src/qt3/widgets valueFormatters.cpp, 1.6, 1.7
Status: Beta
Brought to you by:
jahshaka
From: John B. <ok_...@us...> - 2007-04-05 16:22:19
|
Update of /cvsroot/jahshaka/jah/jahwidgets/src/qt3/widgets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31548/jahwidgets/src/qt3/widgets Modified Files: valueFormatters.cpp Log Message: Adding warning for potential div by 0. Index: valueFormatters.cpp =================================================================== RCS file: /cvsroot/jahshaka/jah/jahwidgets/src/qt3/widgets/valueFormatters.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- valueFormatters.cpp 15 Sep 2006 16:16:42 -0000 1.6 +++ valueFormatters.cpp 5 Apr 2007 16:22:16 -0000 1.7 @@ -70,6 +70,11 @@ QString TimecodeValueFormatter::convert( int frame ) const { + if ( m_fps < 1 ) { + qWarning( "TimecodeValueFormatter invalid fps: %d", m_fps ); + return QString(); + } + int val = correct( abs( frame ) ); int ff = val % m_fps; int ss = ( val / m_fps ) % 60; |