MIDI: Reject files with no event data

CQTexperiment
Christopher Snowhill 2021-04-11 17:23:55 -07:00
parent 2925a37a81
commit 4ea289ba27
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,9 @@ static OSType getOSType(const char * in_)
if ( !midi_processor::process_file(file_data, [[[s url] pathExtension] UTF8String], midi_file) )
return NO;
if ( !midi_file.get_timestamp_end( track_num ) )
return NO;
track_num = [[[s url] fragment] intValue]; //What if theres no fragment? Assuming we get 0.
midi_file.scan_for_loops( true, true, true, true );