mirror of https://github.com/odrling/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
|
@ -331,8 +331,16 @@ void AudioController::OpenAudio(const wxString &url)
|
|||
video_position_marker_provider->AddMarkerMovedListener(std::tr1::bind(std::tr1::ref(AnnounceMarkerMoved)));
|
||||
}
|
||||
|
||||
// Tell listeners about this.
|
||||
AnnounceAudioOpen(provider);
|
||||
try
|
||||
{
|
||||
// Tell listeners about this.
|
||||
AnnounceAudioOpen(provider);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
CloseAudio();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue