From 252a218823c6a0e236f5f97de0fc68e32c46cfe8 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Mon, 22 Jan 2018 23:52:11 +0100 Subject: [PATCH] Delete QTimer also on widget destruction, not only on Entry destruction --- src/gui/DetailsWidget.cpp | 3 +++ src/gui/TotpDialog.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/gui/DetailsWidget.cpp b/src/gui/DetailsWidget.cpp index 1c37c6054d..9f0d2bfd8a 100644 --- a/src/gui/DetailsWidget.cpp +++ b/src/gui/DetailsWidget.cpp @@ -66,6 +66,9 @@ DetailsWidget::DetailsWidget(QWidget* parent) DetailsWidget::~DetailsWidget() { + if (m_timer) { + delete m_timer; + } } void DetailsWidget::getSelectedEntry(Entry* selectedEntry) diff --git a/src/gui/TotpDialog.cpp b/src/gui/TotpDialog.cpp index 7c9d8eda4a..7325d25362 100644 --- a/src/gui/TotpDialog.cpp +++ b/src/gui/TotpDialog.cpp @@ -92,4 +92,7 @@ double TotpDialog::resetCounter() TotpDialog::~TotpDialog() { + if (m_totpUpdateTimer) { + delete m_totpUpdateTimer; + } }