1
0
Эх сурвалжийг харах

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

Sam Lantinga 2 жил өмнө
parent
commit
627e15871a

+ 4 - 3
src/joystick/SDL_gamecontroller.c

@@ -3280,10 +3280,11 @@ const char *SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *g
     }
     }
     SDL_UnlockJoysticks();
     SDL_UnlockJoysticks();
 
 
-    return retval;
-#else
-    return NULL;
+    if (retval && *retval) {
+        return retval;
+    }
 #endif
 #endif
+    return NULL;
 }
 }
 
 
 /* vi: set ts=4 sw=4 expandtab: */
 /* vi: set ts=4 sw=4 expandtab: */