From 2b0ad4477e9dc94e5e1b974cb878b39e981d014b Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Mon, 4 Apr 2016 00:10:18 +0300 Subject: [PATCH] Fix memory leak. --- src/gui/shutdownconfirm.cpp | 5 +++++ src/gui/shutdownconfirm.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/gui/shutdownconfirm.cpp b/src/gui/shutdownconfirm.cpp index 663df13bc..d68f6bd69 100644 --- a/src/gui/shutdownconfirm.cpp +++ b/src/gui/shutdownconfirm.cpp @@ -74,6 +74,11 @@ ShutdownConfirmDlg::ShutdownConfirmDlg(const ShutdownAction &action) move(Utils::Misc::screenCenter(this)); } +ShutdownConfirmDlg::~ShutdownConfirmDlg() +{ + delete ui; +} + void ShutdownConfirmDlg::showEvent(QShowEvent *event) { QDialog::showEvent(event); diff --git a/src/gui/shutdownconfirm.h b/src/gui/shutdownconfirm.h index 7304fa9d7..6b2f0ae04 100644 --- a/src/gui/shutdownconfirm.h +++ b/src/gui/shutdownconfirm.h @@ -49,6 +49,7 @@ class ShutdownConfirmDlg : public QDialog public: ShutdownConfirmDlg(const ShutdownAction &action); + ~ShutdownConfirmDlg(); bool shutdown() const; static bool askForConfirmation(const ShutdownAction &action);