track: check for negative values too

This commit is contained in:
itsmattkc
2022-07-16 18:37:27 -07:00
parent 24ae3a25d3
commit f14112a775
+1 -1
View File
@@ -38,7 +38,7 @@ TrackList::TrackList(Sequence *parent, const Track::Type &type, const QString &t
Track *TrackList::GetTrackAt(int index) const
{
if (index < track_cache_.size()) {
if (index >= 0 && index < track_cache_.size()) {
return track_cache_.at(index);
} else {
return nullptr;