Commits

Anonymous committed 4d7954a

Added error check for GME plugin to stop crashes on unsupported files.

Comments (0)

Files changed (1)

Plugins/GME/GameContainer.m

 		return nil;
 	}
 	
-	gme_err_t error;
 	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);
 	
 	NSMutableArray *tracks = [NSMutableArray array];