[SDL2] pointer boolean (#8523)
This commit is contained in:
parent
4a3a9f3ad8
commit
a14b948b6c
394 changed files with 2564 additions and 2559 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue