vspader / Cog (http://cogx.org/)

Cog, an audio player for Mac OS X.

Clone this repository (size: 34.4 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/vspader/cog/
commit 926: 4d7954a8f104
parent 925: ca8e0966c259
branch: cog
Added error check for GME plugin to stop crashes on unsupported files.
Vincent Spader / vspader
8 months ago

Changed (Δ120 bytes):

raw changeset »

Plugins/GME/GameContainer.m (5 lines added, 2 lines removed)

Up to file-list Plugins/GME/GameContainer.m:

31
31
		return nil;
32
32
	}
33
33
	
34
	gme_err_t error;
35
34
	Music_Emu *emu;
36
	error = gme_open_file([[url path] UTF8String], &emu, 44100);
35
	gme_err_t error = gme_open_file([[url path] UTF8String], &emu, 44100);
36
	if (NULL != error) {
37
		NSLog(@"GME: Error loading file: %@ %s", [url path], error);
38
		return [NSArray arrayWithObject:url];
39
	}
37
40
	int track_count = gme_track_count(emu);
38
41
	
39
42
	NSMutableArray *tracks = [NSMutableArray array];