mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-04 15:12:47 +02:00
[SDL2] pointer boolean (#8523)
This commit is contained in:
@@ -372,7 +372,7 @@ static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
|
||||
void *retval = NULL;
|
||||
if (lib) {
|
||||
retval = (void *) GetProcAddress(lib, sym);
|
||||
if (retval == NULL) {
|
||||
if (!retval) {
|
||||
FreeLibrary(lib);
|
||||
}
|
||||
}
|
||||
@@ -385,9 +385,9 @@ static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
|
||||
{
|
||||
void *lib = dlopen(fname, RTLD_NOW | RTLD_LOCAL);
|
||||
void *retval = NULL;
|
||||
if (lib != NULL) {
|
||||
if (lib) {
|
||||
retval = dlsym(lib, sym);
|
||||
if (retval == NULL) {
|
||||
if (!retval) {
|
||||
dlclose(lib);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user