From 9750986b29caa220048f8eb80b24dfef73d951d4 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 25 May 2022 22:54:14 +0300 Subject: [PATCH 19/19] Qt: Fix handle_diplomacy_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 341a9c4683..7c3f7cae40 100644 --- a/client/gui-qt/diplodlg.cpp +++ b/client/gui-qt/diplodlg.cpp @@ -925,6 +925,7 @@ void handle_diplomacy_init_meeting(int counterpart, int initiated_from) player_by_number(counterpart)))); 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 9cde838865..46e653bf00 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