mirror of https://github.com/odrling/Aegisub
Fixed #662, that resulted in crashes when trying to load an empty avs file.
Originally committed to SVN as r1927.
This commit is contained in:
parent
2e7a77ec64
commit
bb7177dcfb
|
@ -280,7 +280,7 @@ PClip AvisynthVideoProvider::OpenVideo(wxString _filename, bool mpeg2dec3_priori
|
|||
}
|
||||
|
||||
// Check if video was loaded properly
|
||||
if (!script.AsClip()->GetVideoInfo().HasVideo()) {
|
||||
if (!script.IsClip() || !script.AsClip()->GetVideoInfo().HasVideo()) {
|
||||
AVSTRACE(_T("AvisynthVideoProvider::OpenVideo: No suitable video found"));
|
||||
throw _T("Avisynth: No usable video found in ") + _filename;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue