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 - MOD_init() returns bad error code
Summary: MOD_init() returns bad error code
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-03 15:18 UTC by Ozkan Sezer
Modified: 2009-10-03 18:12 UTC (History)
1 user (show)

See Also:


Attachments
MOD_init error return fix (285 bytes, patch)
2009-10-03 15:18 UTC, Ozkan Sezer
Details | Diff
use Mix_SetError and return -1 when fail to load MikMod library (654 bytes, patch)
2009-10-03 16:25 UTC, Alam Arias
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!