SDL: Fix potential NULL pointer dereference

From d17b8412f131015c1d748e675c7aa8cf89c3861a Mon Sep 17 00:00:00 2001
From: Mathieu Eyraud <[EMAIL REDACTED]>
Date: Thu, 6 Nov 2025 13:17:41 +0100
Subject: [PATCH] Fix potential NULL pointer dereference

---
 src/io/io_uring/SDL_asyncio_liburing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/io/io_uring/SDL_asyncio_liburing.c b/src/io/io_uring/SDL_asyncio_liburing.c
index c1d9e5aeb8cd8..6500893e564ff 100644
--- a/src/io/io_uring/SDL_asyncio_liburing.c
+++ b/src/io/io_uring/SDL_asyncio_liburing.c
@@ -252,7 +252,7 @@ static SDL_AsyncIOTask *ProcessCQE(LibUringAsyncIOQueueData *queuedata, struct i
             }
         }
 
-        if ((task->type == SDL_ASYNCIO_TASK_CLOSE) && task->flush) {
+        if (task && (task->type == SDL_ASYNCIO_TASK_CLOSE) && task->flush) {
             task->flush = false;
             task = NULL;  // don't return this one, it's a linked task, so it'll arrive in a later CQE.
         }