diff --git a/src/gui/applyprogressdialog.h b/src/gui/applyprogressdialog.h
index 0277faa..b838bb0 100644
--- a/src/gui/applyprogressdialog.h
+++ b/src/gui/applyprogressdialog.h
@@ -16,8 +16,7 @@
* along with this program. If not, see .*
*************************************************************************/
-#if !defined(APPLYPROGRESSDIALOG_H)
-
+#ifndef APPLYPROGRESSDIALOG_H
#define APPLYPROGRESSDIALOG_H
#include
diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp
index 404150e..be7bbcf 100644
--- a/src/gui/mainwindow.cpp
+++ b/src/gui/mainwindow.cpp
@@ -166,6 +166,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
KXmlGuiWindow::closeEvent(event);
ExternalCommand::stopHelper();
+ delete m_ApplyProgressDialog;
}
void MainWindow::changeEvent(QEvent* event)