Commit 6d1710c7 authored by Max Kellermann's avatar Max Kellermann

PlaylistPrint: catch Database::GetSong() exceptions

parent 233b8d01
......@@ -125,9 +125,14 @@ PrintSongDetails(Response &r, Partition &partition, const char *uri_utf8)
if (db == nullptr)
return false;
auto *song = db->GetSong(uri_utf8, IgnoreError());
if (song == nullptr)
const LightSong *song;
try {
song = db->GetSong(uri_utf8, IgnoreError());
if (song == nullptr)
return false;
} catch (const std::runtime_error &e) {
return false;
}
song_print_info(r, partition, *song);
db->ReturnSong(song);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment