فهرست منبع

Avoid code duplication in SDL_GetPixelFormatDetails

Anonymous Maarten 9 ماه پیش
والد
کامیت
c80665a696
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      src/video/SDL_pixels.c

+ 1 - 2
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 */