Skip to content

Commit

Permalink
Fix a race condition in getLocation()
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Sep 24, 2023
1 parent 2ed4299 commit a6c45da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/track/track.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ class Track : public QObject {

// Returns absolute path to the file, including the filename.
QString getLocation() const {
if (!m_fileAccess.info().hasLocation()) {
const auto fileInfo = getFileInfo() if (!fileInfo.hasLocation()) {
return {};
}
return m_fileAccess.info().location();
return fileInfo.location();
}

/// Set the file type
Expand Down

0 comments on commit a6c45da

Please sign in to comment.