Skip to content

Commit d17b841

Browse files
meyraud705slouken
authored andcommitted
Fix potential NULL pointer dereference
1 parent 04af745 commit d17b841

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/io/io_uring/SDL_asyncio_liburing.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static SDL_AsyncIOTask *ProcessCQE(LibUringAsyncIOQueueData *queuedata, struct i
252252
}
253253
}
254254

255-
if ((task->type == SDL_ASYNCIO_TASK_CLOSE) && task->flush) {
255+
if (task && (task->type == SDL_ASYNCIO_TASK_CLOSE) && task->flush) {
256256
task->flush = false;
257257
task = NULL; // don't return this one, it's a linked task, so it'll arrive in a later CQE.
258258
}

0 commit comments

Comments
 (0)