SDL: SDL_GameControllerGetAppleSFSymbolsNameForAxis() returns NULL if the symbol isn't found

From 627e15871a1c48441e423fe1b6c3d8098ac9c3c8 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 3 Mar 2024 11:56:29 -0800
Subject: [PATCH] SDL_GameControllerGetAppleSFSymbolsNameForAxis() returns NULL
 if the symbol isn't found

---
 src/joystick/SDL_gamecontroller.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index 0e2dbe14e283..bbb7f7994da8 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -3280,10 +3280,11 @@ const char *SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *g
     }
     SDL_UnlockJoysticks();
 
-    return retval;
-#else
-    return NULL;
+    if (retval && *retval) {
+        return retval;
+    }
 #endif
+    return NULL;
 }
 
 /* vi: set ts=4 sw=4 expandtab: */