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.
authorSam Lantinga <slouken@libsdl.org>
Thu, 13 Feb 2014 11:05:26 -0800
changeset 8211089bc02a5e4b
parent 8210 581caa876b2e
child 8212 d278747da408
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
src/loadso/windows/SDL_sysloadso.c
     1.1 --- a/src/loadso/windows/SDL_sysloadso.c	Thu Feb 13 11:05:24 2014 -0800
     1.2 +++ b/src/loadso/windows/SDL_sysloadso.c	Thu Feb 13 11:05:26 2014 -0800
     1.3 @@ -55,7 +55,8 @@
     1.4  	/* if we got a handle, call LoadLibrary to get
     1.5  	*  it again with the ref count incremented.
     1.6  	* We do this to match the dlopen version of this function */
     1.7 -	handle = (void *)LoadLibrary( tstr );
     1.8 +	if( handle != NULL )
     1.9 +		handle = (void *)LoadLibrary( tstr );
    1.10  
    1.11      SDL_free(tstr);
    1.12