mirror of https://github.com/odrling/Aegisub
Only wrap the avisynth-using part of AvisynthVideoProvider's constructor with try/catch so that avisynth is still initialized when the catch handler runs, which is required to actually get an error message. Closes #1444.
Originally committed to SVN as r6438.
This commit is contained in:
parent
c5c829357d
commit
ddc8dc9eca
|
@ -53,7 +53,7 @@
|
|||
#include "standard_paths.h"
|
||||
#include "video_provider_avs.h"
|
||||
|
||||
AvisynthVideoProvider::AvisynthVideoProvider(wxString filename) try
|
||||
AvisynthVideoProvider::AvisynthVideoProvider(wxString filename)
|
||||
: last_fnum(-1)
|
||||
{
|
||||
iframe.flipped = true;
|
||||
|
@ -145,6 +145,7 @@ file_exit:
|
|||
}
|
||||
#endif
|
||||
|
||||
try {
|
||||
AVSValue script = Open(fname, extension);
|
||||
|
||||
// Check if video was loaded properly
|
||||
|
@ -158,6 +159,7 @@ file_exit:
|
|||
catch (AvisynthError const& err) {
|
||||
throw VideoOpenError("Avisynth error: " + std::string(err.msg));
|
||||
}
|
||||
}
|
||||
|
||||
AvisynthVideoProvider::~AvisynthVideoProvider() {
|
||||
iframe.Clear();
|
||||
|
|
Loading…
Reference in New Issue