SDL_GetGamepadAppleSFSymbolsNameForAxis() returns NULL if the symbol isn't found

This commit is contained in:
Sam Lantinga committed 2024-03-03 11:55:40 -08:00
1 parent 5f37242607
commit 1b86a1c684
1 file changed
+4 -3
+4 -3
View File
@@ -3771,8 +3771,9 @@ const char *SDL_GetGamepadAppleSFSymbolsNameForAxis(SDL_Gamepad *gamepad, SDL_Ga
} }
SDL_UnlockJoysticks(); SDL_UnlockJoysticks();
return retval; if (retval && *retval) {
#else return retval;
return NULL; }
#endif #endif
return NULL;
} }