From 0e494a3b44a920d961b3eea893dcd4e6128f0e9c Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Tue, 5 Feb 2013 17:02:39 -0500 Subject: [PATCH] Address warp issue if never passed a warp yet. Thanks to phantom again for catching this. --- src/TimingData.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/TimingData.cpp b/src/TimingData.cpp index 02653f81b8..f9a0ed9bee 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -218,6 +218,10 @@ bool TimingData::IsWarpAtRow( int iNoteRow ) const return false; int i = GetSegmentIndexAtRow( SEGMENT_WARP, iNoteRow ); + if (i == -1) + { + return false; + } const WarpSegment *s = ToWarp(warps[i]); float beatRow = NoteRowToBeat(iNoteRow); if( s->GetBeat() <= beatRow && beatRow < (s->GetBeat() + s->GetLength() ) )