As part of Jorgen's code review of this function I added a call to LoadLibrary so the refcounts would be consistent between Windows and Posix. Then I forgot to include the check that the thing was actually loaded and caused it to be loaded all the time. Oops.

CR: AaronL
Sam Lantinga 2014-02-13 11:05:26 -08:00
parent 1fa4939a38
commit 567b5ba8e9
1 changed files with 2 additions and 1 deletions

View File

@ -55,6 +55,7 @@ SDL_GetLoadedObject(const char *sofile)
/* if we got a handle, call LoadLibrary to get /* if we got a handle, call LoadLibrary to get
* it again with the ref count incremented. * it again with the ref count incremented.
* We do this to match the dlopen version of this function */ * We do this to match the dlopen version of this function */
if( handle != NULL )
handle = (void *)LoadLibrary( tstr ); handle = (void *)LoadLibrary( tstr );
SDL_free(tstr); SDL_free(tstr);