Don't operate on empty vector.

This commit is contained in:
Bartosz Taudul 2019-12-28 18:03:13 +01:00
parent bb121b29e3
commit 0ff6d6364b

View File

@ -8392,6 +8392,8 @@ void View::DrawFindZone()
} }
} }
} }
if( !vec.empty() )
{
auto mid = vec.begin() + m_findZone.selSortActive; auto mid = vec.begin() + m_findZone.selSortActive;
pdqsort_branchless( mid, vec.end() ); pdqsort_branchless( mid, vec.end() );
std::inplace_merge( vec.begin(), mid, vec.end() ); std::inplace_merge( vec.begin(), mid, vec.end() );
@ -8403,6 +8405,7 @@ void View::DrawFindZone()
m_findZone.selSortActive = act; m_findZone.selSortActive = act;
} }
} }
}
if( tmin != std::numeric_limits<int64_t>::max() && !m_findZone.sorted.empty() ) if( tmin != std::numeric_limits<int64_t>::max() && !m_findZone.sorted.empty() )
{ {