From d7b12554840d602517223ab7d7bdeaa10ea4ae14 Mon Sep 17 00:00:00 2001 From: zanadoman Date: Wed, 27 May 2026 10:36:15 +0200 Subject: [PATCH] GPU: Return early in SDL_WaitForGPUFences if num_fences is 0 --- src/gpu/SDL_gpu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gpu/SDL_gpu.c b/src/gpu/SDL_gpu.c index 01e1eb5e9c..e980905b30 100644 --- a/src/gpu/SDL_gpu.c +++ b/src/gpu/SDL_gpu.c @@ -3468,7 +3468,11 @@ bool SDL_WaitForGPUFences( { CHECK_DEVICE_MAGIC(device, false); - CHECK_PARAM(fences == NULL && num_fences > 0) { + if (!num_fences) { + return true; + } + + CHECK_PARAM(fences == NULL) { SDL_InvalidParamError("fences"); return false; }