SDL: Fixed converting RLE encoded surfaces to other formats

From bf0752a8d7636a648a108fc820c4eec6afff671b Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 29 Oct 2025 09:06:25 -0700
Subject: [PATCH] Fixed converting RLE encoded surfaces to other formats

---
 src/video/SDL_surface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c
index 9ae4f21586cbd..104b7b9d5dc7a 100644
--- a/src/video/SDL_surface.c
+++ b/src/video/SDL_surface.c
@@ -2014,7 +2014,7 @@ SDL_Surface *SDL_ConvertSurfaceAndColorspace(SDL_Surface *surface, SDL_PixelForm
         }
     }
 
-    if (surface->pixels) {
+    if (surface->pixels || SDL_MUSTLOCK(surface)) {
         result = SDL_BlitSurfaceUnchecked(surface, &bounds, convert, &bounds);
     } else {
         result = true;