check GIF list files to be the same size so not crashing
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / file.C
index dbcd68899a5e150fe5e79d256fe0276fbefeb1f6..03941d9a0fceb32a38067e3d8bd82420c2034c92 100644 (file)
@@ -658,6 +658,17 @@ int File::open_file(Preferences *preferences,
        }
 
 
+// If file type is a list verify that all files match in dimensions.
+// Should be done only after the file open function has been performed
+// Reason: although this function checks if file exists or not but
+// it has no way of relaying this information back and if this function
+// is called before open_file the program may accidently interpret file
+// not found as file size don't match
+ if( !file->verify_file_list() ) {
+  delete file;  file = 0;
+  return FILE_SIZE_DONT_MATCH;
+ }
+
 
 // Set extra writing parameters to mandatory settings.
        if( wr ) {