Hopefully fix assertion failure when audio provider creation succeeds but audio player fails to init.
Originally committed to SVN as r1397.
This commit is contained in:
parent
befce025c0
commit
3362b61f73
1 changed files with 4 additions and 0 deletions
|
@ -847,10 +847,14 @@ void AudioDisplay::SetFile(wxString file) {
|
|||
UpdateImage();
|
||||
}
|
||||
catch (wxString &err) {
|
||||
if (player) delete player;
|
||||
if (provider) delete provider;
|
||||
wxLogDebug(_T("AudioDisplay::SetFile: gotcha!"));
|
||||
wxMessageBox(err,_T("Error loading audio"),wxICON_ERROR | wxOK);
|
||||
}
|
||||
}
|
||||
|
||||
if (!loaded) return;
|
||||
|
||||
assert(loaded == (provider != NULL));
|
||||
|
||||
|
|
Loading…
Reference in a new issue