From 8f97e3d124a71eb003192d173b1b84ccdd947cd3 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 25 May 2022 22:54:14 +0300 Subject: [PATCH 25/25] Qt: Fix qtg_init_meeting() pixmap leak See osdn #44618 Signed-off-by: Marko Lindqvist --- client/gui-qt/diplodlg.cpp | 1 + client/gui-qt/fc_client.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/gui-qt/diplodlg.cpp b/client/gui-qt/diplodlg.cpp index 71bf27b0af..8985aa22f6 100644 --- a/client/gui-qt/diplodlg.cpp +++ b/client/gui-qt/diplodlg.cpp @@ -930,6 +930,7 @@ void qtg_init_meeting(struct Treaty *ptreaty, struct player *they, they))); gui()->sw_diplo->update_final_pixmap(); delete pix2; + delete def_pix; delete def_pix_del; if (!gui()->is_repo_dlg_open("DDI")) { diff --git a/client/gui-qt/fc_client.cpp b/client/gui-qt/fc_client.cpp index 4ad991f89a..792cb9b6e1 100644 --- a/client/gui-qt/fc_client.cpp +++ b/client/gui-qt/fc_client.cpp @@ -991,7 +991,7 @@ QIcon fc_icons::get_icon(const QString &id) /************************************************************************//** Returns pixmap by given name, pixmap needs to be deleted by someone else ****************************************************************************/ -QPixmap* fc_icons::get_pixmap(const QString &id) +QPixmap *fc_icons::get_pixmap(const QString &id) { QPixmap *pm; bool status; -- 2.35.1