From 31fa7ca061aa5b0b6d39dab24630024ec32927b4 Mon Sep 17 00:00:00 2001 From: Vesa Date: Fri, 7 Mar 2014 11:54:17 +0200 Subject: [PATCH] AutomationPattern: fix a bug I accidentally introduced in length() --- src/core/AutomationPattern.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index adebac163..76d2d2b16 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -165,6 +165,7 @@ const AutomatableModel * AutomationPattern::firstObject() const MidiTime AutomationPattern::length() const { + if( m_timeMap.isEmpty() ) return 0; timeMap::const_iterator it = m_timeMap.end(); return MidiTime( qMax( MidiTime( (it-1).key() ).getTact() + 1, 1 ), 0 ); }