SDL_image: Removed unnecessary SDL_SetError() calls

From 329cbf55eaf26ef513909cbb1fbc20c421561e41 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 19 Oct 2025 18:15:47 -0700
Subject: [PATCH] Removed unnecessary SDL_SetError() calls

---
 src/IMG_avif.c   | 2 +-
 src/IMG_libpng.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/IMG_avif.c b/src/IMG_avif.c
index 896e96fd..76bed65b 100644
--- a/src/IMG_avif.c
+++ b/src/IMG_avif.c
@@ -1052,7 +1052,7 @@ bool IMG_CreateAVIFAnimationDecoder(IMG_AnimationDecoder *decoder, SDL_Propertie
 
     IMG_AnimationDecoderContext *ctx = (IMG_AnimationDecoderContext *)SDL_calloc(1, sizeof(*ctx));
     if (!ctx) {
-        return SDL_SetError("Out of memory for AVIF decoder context");
+        return false;
     }
 
     ctx->start_pos = SDL_TellIO(decoder->src);
diff --git a/src/IMG_libpng.c b/src/IMG_libpng.c
index a11b51be..6dd9e5db 100644
--- a/src/IMG_libpng.c
+++ b/src/IMG_libpng.c
@@ -1148,7 +1148,7 @@ static bool IMG_AnimationDecoderGetNextFrame_Internal(IMG_AnimationDecoder *deco
 {
     IMG_AnimationDecoderContext *ctx = decoder->ctx;
     if (!ctx->is_apng) {
-        return SDL_SetError("APNG decoder not properly initialized");
+        return false;
     }
 
     if (ctx->actl.num_frames - ctx->current_frame_index < 1) {