forked from mia/Aegisub
Close audio if an error occurs while announcing the opened audio as the program is probably in an inconsistent state
Originally committed to SVN as r5946.
This commit is contained in:
parent
b4d2bba7a2
commit
f0e98151f1
1 changed files with 10 additions and 2 deletions
|
@ -331,8 +331,16 @@ void AudioController::OpenAudio(const wxString &url)
|
|||
video_position_marker_provider->AddMarkerMovedListener(std::tr1::bind(std::tr1::ref(AnnounceMarkerMoved)));
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Tell listeners about this.
|
||||
AnnounceAudioOpen(provider);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
CloseAudio();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue