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:
Rodrigo Braz Monteiro 2008-03-06 21:38:40 +00:00
parent 2e7a77ec64
commit bb7177dcfb
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}