SDL: Make sure XSetIMValues is terminated with a null pointer value

From 5180c654d439ad7df5eb99481fd0e3f027db65de Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 12 Oct 2026 15:10:36 -0700
Subject: [PATCH] Make sure XSetIMValues is terminated with a null pointer
 value

Sometimes NULL is defined as 0 and on 64-bit systems it really needs to be a null pointer to properly terminate the variadic argument list.
---
 src/video/x11/SDL_x11keyboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/x11/SDL_x11keyboard.c b/src/video/x11/SDL_x11keyboard.c
index b1fb94c078f7e..cee7a8e268be8 100644
--- a/src/video/x11/SDL_x11keyboard.c
+++ b/src/video/x11/SDL_x11keyboard.c
@@ -164,7 +164,7 @@ static bool X11_InitIM(SDL_VideoData *videodata)
         destroyed_callback.client_data = (XPointer)videodata;
         destroyed_callback.callback = (XIMProc)im_destroyed_handler;
 
-        X11_XSetIMValues(im, XNDestroyCallback, &destroyed_callback, NULL);
+        X11_XSetIMValues(im, XNDestroyCallback, &destroyed_callback, (char *)NULL);
 
         /* Attach the new IC to any existing windows.
          *