lib: Don't try to load a track that doesn't exist

This was causing me to throw an exception that never got caught.

Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
This commit is contained in:
Anna Schumaker 2014-04-09 19:32:46 -04:00
parent 8d29ce7169
commit cbe725d891
1 changed files with 5 additions and 1 deletions

View File

@ -230,7 +230,11 @@ void audio :: load_trackid(unsigned int track_id)
return;
track_loaded = false;
library :: lookup(track_id, &song);
try {
library :: lookup(track_id, &song);
} catch (int err) {
return;
}
load_song(song);
track_loaded = true;