Skip to content

Commit

Permalink
Merge pull request #3494 from uklotzde/last_played_at
Browse files Browse the repository at this point in the history
last_played_at: Fix debug assertion for invalid/missing time stamps
  • Loading branch information
daschuer authored Dec 28, 2020
2 parents 8ba1a80 + 964077d commit 6d81770
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/library/basetracktablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,9 @@ QVariant BaseTrackTableModel::roleValue(
// cached in memory (local time)
lastPlayedAt = rawValue.toDateTime().toUTC();
}
if (!lastPlayedAt.isValid()) {
return QVariant();
}
DEBUG_ASSERT(lastPlayedAt.timeSpec() == Qt::UTC);
return mixxx::localDateTimeFromUtc(lastPlayedAt);
}
Expand Down

0 comments on commit 6d81770

Please sign in to comment.