From a6c45da9203eaf0a2c9415c359d473777f68c0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Mon, 25 Sep 2023 01:43:57 +0200 Subject: [PATCH] Fix a race condition in getLocation() --- src/track/track.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/track/track.h b/src/track/track.h index 315eabeba25c..e9ea78362c57 100644 --- a/src/track/track.h +++ b/src/track/track.h @@ -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