mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-04 23:22:48 +02:00
Fix potential NULL pointer dereference
This commit is contained in:
committed by
Sam Lantinga
parent
04af745fec
commit
d17b8412f1
@@ -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.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user