diff --git a/src/sources/soundsourceproxy.cpp b/src/sources/soundsourceproxy.cpp index 4ec589cd21c..abd948291b8 100644 --- a/src/sources/soundsourceproxy.cpp +++ b/src/sources/soundsourceproxy.cpp @@ -656,6 +656,13 @@ SoundSourceProxy::UpdateTrackFromSourceResult SoundSourceProxy::updateTrackFromS mixxx::TrackMetadata trackMetadata = m_pTrack->getMetadata(&sourceSyncStatus); + if (sourceSyncStatus == mixxx::TrackRecord::SourceSyncStatus::Undefined) { + kLogger.warning() + << "Unable to update track from missing or inaccessible file" + << getUrl().toString(); + return UpdateTrackFromSourceResult::NotUpdated; + } + // Save for later to replace the unreliable and imprecise audio // properties imported from file tags (see below). const auto preciseStreamInfo = trackMetadata.getStreamInfo(); diff --git a/src/track/trackrecord.cpp b/src/track/trackrecord.cpp index 521abee151d..090d18d9288 100644 --- a/src/track/trackrecord.cpp +++ b/src/track/trackrecord.cpp @@ -161,6 +161,12 @@ TrackRecord::SourceSyncStatus TrackRecord::checkSourceSyncStatus( // 37 don't have a synchronization time stamp. return SourceSyncStatus::Unknown; } + if (!fileInfo.exists()) { + kLogger.warning() + << "Failed to obtain synchronization time stamp for not existing file" + << mixxx::FileInfo(fileInfo); + return SourceSyncStatus::Undefined; + } const QDateTime fileSourceSynchronizedAt = MetadataSource::getFileSynchronizedAt(fileInfo.toQFile()); if (!fileSourceSynchronizedAt.isValid()) {