aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--courtroom.cpp4
1 files changed, 3 insertions, 1 deletions
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())