Skip to content

Commit

Permalink
Merge pull request #4063 from uklotzde/format-bpm
Browse files Browse the repository at this point in the history
Fix debug assertion when exporting invalid bpm as file tag
  • Loading branch information
Holzhaus committed Jul 6, 2021
2 parents 8a35dc8 + a3d40eb commit 8d75d83
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/track/taglib/trackmetadata_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ inline TagLib::String uuidToTString(

inline QString formatBpm(
const TrackMetadata& trackMetadata) {
return Bpm::valueToString(
trackMetadata.getTrackInfo().getBpm().value());
const Bpm bpm = trackMetadata.getTrackInfo().getBpm();
if (!bpm.isValid()) {
return {};
}
return Bpm::valueToString(bpm.value());
}

bool parseBpm(
Expand Down

0 comments on commit 8d75d83

Please sign in to comment.