From 9465ad36b84da47c7551cdf86f5078d5feee62a8 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 24 Jun 2022 21:20:10 +0300 Subject: [PATCH 19/19] sdl/2: Fix nation selection dialog surface leak See osdn #44893 Signed-off-by: Marko Lindqvist --- client/gui-sdl/dialogs.c | 1 + client/gui-sdl2/dialogs.c | 1 + 2 files changed, 2 insertions(+) diff --git a/client/gui-sdl/dialogs.c b/client/gui-sdl/dialogs.c index 1648f210d6..258c48f6b9 100644 --- a/client/gui-sdl/dialogs.c +++ b/client/gui-sdl/dialogs.c @@ -3096,6 +3096,7 @@ void popup_races_dialog(struct player *pplayer) dst.y = (pTmp_Surf->h - len) / 2; alphablit(pTmp_Surf_zoomed, NULL, pTmp_Surf, &dst); dst.y += (pTmp_Surf_zoomed->h + adj_size(10)); + FREESURFACE(pTmp_Surf_zoomed); dst.x = (pTmp_Surf->w - pText_Name->w) / 2; alphablit(pText_Name, NULL, pTmp_Surf, &dst); diff --git a/client/gui-sdl2/dialogs.c b/client/gui-sdl2/dialogs.c index ac39347c95..7782c542f6 100644 --- a/client/gui-sdl2/dialogs.c +++ b/client/gui-sdl2/dialogs.c @@ -3079,6 +3079,7 @@ void popup_races_dialog(struct player *pplayer) dst.y = (pTmp_Surf->h - len) / 2; alphablit(pTmp_Surf_zoomed, NULL, pTmp_Surf, &dst, 255); dst.y += (pTmp_Surf_zoomed->h + adj_size(10)); + FREESURFACE(pTmp_Surf_zoomed); dst.x = (pTmp_Surf->w - pText_Name->w) / 2; alphablit(pText_Name, NULL, pTmp_Surf, &dst, 255); -- 2.35.1