Fixed the bug of program crashing when choosing a file

which has no avi extension