summaryrefslogtreecommitdiff
path: root/src/gui/windows/serverdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/serverdialog.cpp')
-rw-r--r--src/gui/windows/serverdialog.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 33b6f1599..9e85f5c89 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -46,6 +46,7 @@
#include "gui/widgets/listbox.h"
#include "gui/widgets/scrollarea.h"
+#include "utils/delete2.h"
#include "utils/gettext.h"
#include "utils/langs.h"
@@ -295,11 +296,9 @@ ServerDialog::~ServerDialog()
if (mDownload)
{
mDownload->cancel();
- delete mDownload;
- mDownload = nullptr;
+ delete2(mDownload)
}
- delete mServersListModel;
- mServersListModel = nullptr;
+ delete2(mServersListModel);
}
void ServerDialog::connectToSelectedServer()
@@ -517,8 +516,7 @@ void ServerDialog::downloadServerList()
if (mDownload)
{
mDownload->cancel();
- delete mDownload;
- mDownload = nullptr;
+ delete2(mDownload)
}
mDownload = new Net::Download(this, listFile,