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:
parent
8d29ce7169
commit
cbe725d891
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue