command/file: return directory_uri if real_uri is unset

Prevent a segfault when accessing album art.

Fix #1224 #1225
This commit is contained in:
Samir Benmendil
2021-08-15 12:46:22 +01:00
committed by Max Kellermann
parent 993d85125e
commit cfe024ea13
2 changed files with 5 additions and 0 deletions

View File

@@ -267,6 +267,9 @@ try {
AtScopeExit(db, song) { db->ReturnSong(song); };
if (song->real_uri == nullptr)
return directory_uri;
const char *real_uri = song->real_uri;
/* this is a simplification which is just enough for CUE