Browse Source

only deleting pending_task ptr if not null

logicp 4 years ago
parent
commit
57ffd891b2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/argdialog.cpp

+ 3 - 1
src/argdialog.cpp

@@ -391,7 +391,9 @@ void ArgDialog::setConfig(QJsonObject config) {
  */
 ArgDialog::~ArgDialog() {
   delete m_task;
-  delete m_pending_task;
+  if (m_pending_task == nullptr) {
+    delete m_pending_task;
+  }
   delete m_loader;
   delete ui;
 }