Added error check for GME plugin to stop crashes on unsupported files.
parent
a531e31d42
commit
90ae894156
|
@ -31,9 +31,12 @@
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
gme_err_t error;
|
|
||||||
Music_Emu *emu;
|
Music_Emu *emu;
|
||||||
error = gme_open_file([[url path] UTF8String], &emu, 44100);
|
gme_err_t error = gme_open_file([[url path] UTF8String], &emu, 44100);
|
||||||
|
if (NULL != error) {
|
||||||
|
NSLog(@"GME: Error loading file: %@ %s", [url path], error);
|
||||||
|
return [NSArray arrayWithObject:url];
|
||||||
|
}
|
||||||
int track_count = gme_track_count(emu);
|
int track_count = gme_track_count(emu);
|
||||||
|
|
||||||
NSMutableArray *tracks = [NSMutableArray array];
|
NSMutableArray *tracks = [NSMutableArray array];
|
||||||
|
|
Loading…
Reference in New Issue