From c80665a6968e6274b978846ba77b47c9c61c2618 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 14 Jul 2024 01:20:02 +0200 Subject: [PATCH] Avoid code duplication in SDL_GetPixelFormatDetails --- src/video/SDL_pixels.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c index 79b0eade3..6f00f2aae 100644 --- a/src/video/SDL_pixels.c +++ b/src/video/SDL_pixels.c @@ -661,8 +661,7 @@ const SDL_PixelFormatDetails *SDL_GetPixelFormatDetails(SDL_PixelFormat format) } if (SDL_FindInHashTable(SDL_format_details, (const void *)(uintptr_t)format, (const void **)&details)) { - SDL_UnlockMutex(SDL_format_details_lock); - return details; + goto done; } /* Allocate an empty pixel format structure, and initialize it */