From a21c31aea131908590017f50f82b9e1666a15a79 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 (cherry picked from commit d7b12554840d602517223ab7d7bdeaa10ea4ae14) --- 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 7c46ec3ee9..5e6d2aa959 100644 --- a/src/gpu/SDL_gpu.c +++ b/src/gpu/SDL_gpu.c @@ -3449,7 +3449,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; }