diff options
| author | argoneus <argoneuscze@gmail.com> | 2018-07-31 18:08:02 +0200 |
|---|---|---|
| committer | argoneus <argoneuscze@gmail.com> | 2018-07-31 18:08:02 +0200 |
| commit | 83d30e6920d0584d316d4ff12766ab9fe159b01d (patch) | |
| tree | 3b8df008244c81ce8ef37cf6f5d9e8c771aeb155 /courtroom.cpp | |
| parent | de6d325334756e72a9d8706f64c34b7b687523e9 (diff) | |
fixed memory leak
Diffstat (limited to 'courtroom.cpp')
| -rw-r--r-- | courtroom.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/courtroom.cpp b/courtroom.cpp index ec5a07c8..d6256995 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()) |
