We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 824

Summary: MOD_init() returns bad error code
Product: SDL_mixer Reporter: Ozkan Sezer <sezeroz>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: Alam.GBC
Version: unspecified   
Hardware: x86   
OS: Linux   
Attachments: MOD_init error return fix
use Mix_SetError and return -1 when fail to load MikMod library

Description Ozkan Sezer 2009-10-03 15:18:41 UTC
Created attachment 385 [details]
MOD_init error return fix

MOD_init() returns NULL instead of -1.  A quick fix is attached.

--
Ozkan
Comment 1 Alam Arias 2009-10-03 16:20:39 UTC
should it also do Mix_SetError(), like this?

Mix_SetError("Could not load MikMod library");
Comment 2 Alam Arias 2009-10-03 16:25:14 UTC
Created attachment 387 [details]
use Mix_SetError and return -1 when fail to load MikMod library

here my git-svn patch to return -1 in place of return NULL and set an error string of what happened, failed to load the MidMod library
Comment 3 Sam Lantinga 2009-10-03 18:12:57 UTC
The low level SDL routines will set the error message.

Thanks!