MidiTime/Pattern: fixed divisions by zero with time sigs 1/16+

Setting time signatures 1/16+ lead to divisions by zero in two places.
Fixed this by adding according qMax() call (closes #2818125).

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit cb72bf2260)
This commit is contained in:
Tobias Doerffel
2009-07-10 17:47:37 +02:00
parent 29d0d2b43a
commit 54dadfcf48
2 changed files with 3 additions and 2 deletions

View File

@@ -135,7 +135,7 @@ public:
static int stepsPerTact( void )
{
return ticksPerTact() / DefaultBeatsPerTact;
return qMax( 1, ticksPerTact() / DefaultBeatsPerTact );
}
static void setTicksPerTact( tick_t _tpt )