diff --git a/changelog b/changelog index a366409b9fa8..d1c625e66fcf 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ Version 1.11.14+dev: + * Graphics: + * Fixed bug #22045: Only blit neutral surfaces. * Language and i18n: * Updated translations: Portuguese * Miscellaneous and bug fixes: @@ -12,7 +14,6 @@ Version 1.11.14+dev: * Fix bug #22020: make base units with variations help entry clickable from the 'Unit Description' menu entry or from side pane. - Version 1.11.14: * Campaigns: * Son of the Black Eye: minor balance tweaks to scenarios 7, 8 and 14 diff --git a/src/sdl_utils.cpp b/src/sdl_utils.cpp index 4052406b8742..a88036fc3894 100644 --- a/src/sdl_utils.cpp +++ b/src/sdl_utils.cpp @@ -1892,12 +1892,14 @@ surface create_compatible_surface(const surface &surf, int width, int height) return s; } -void blit_surface(const surface& src, +void blit_surface(const surface& surf, const SDL_Rect* srcrect, surface& dst, const SDL_Rect* dstrect) { - assert(src); + assert(surf); assert(dst); + const surface& src = is_neutral(surf) ? surf : make_neutral_surface(surf); + // Get the areas to blit SDL_Rect dst_rect = create_rect(0, 0, dst->w, dst->h); if(dstrect) {