From 83d30e6920d0584d316d4ff12766ab9fe159b01d Mon Sep 17 00:00:00 2001 From: argoneus Date: Tue, 31 Jul 2018 18:08:02 +0200 Subject: [PATCH] fixed memory leak --- courtroom.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/courtroom.cpp b/courtroom.cpp index ec5a07c..d625699 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -2022,8 +2022,10 @@ void Courtroom::on_call_mod_clicked() box->setLabelText("Enter a reason:"); auto code = box->exec(); - if (code != QDialog::Accepted) + if (code != QDialog::Accepted) { + delete box; return; + } auto text = box->textValue(); if (text.isEmpty())