SDL: Added NULL pointer check

From 961488b0dc992365adcc7f9c668da5e62afa3e00 Mon Sep 17 00:00:00 2001
From: APGR22 <[EMAIL REDACTED]>
Date: Fri, 17 May 2024 21:05:40 +0700
Subject: [PATCH] Added NULL pointer check

---
 src/SDL_hints.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/SDL_hints.c b/src/SDL_hints.c
index b3cebbf9dc0ba..95d57f134df4a 100644
--- a/src/SDL_hints.c
+++ b/src/SDL_hints.c
@@ -163,6 +163,10 @@ const char *SDL_GetHint(const char *name)
     const char *env;
     SDL_Hint *hint;
 
+    if (!name) {
+        return NULL;
+    }
+
     env = SDL_getenv(name);
     for (hint = SDL_hints; hint; hint = hint->next) {
         if (SDL_strcmp(name, hint->name) == 0) {