aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpmainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-07 23:58:52 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-07 23:58:52 +0800
commitf0d2584fdad44703f3966eb0b1e695341a4ca01c (patch)
tree354a6f8a961a07a14a8b7f1887e66986e558d303 /qmidiplayer-desktop/qmpmainwindow.cpp
parent909cfe195ae2f6058a03875123f1e80f2a3fa0fa (diff)
downloadQMidiPlayer-f0d2584fdad44703f3966eb0b1e695341a4ca01c.tar.xz
Added two new options.
Fixed several crashes related to options without a description. Sanitise deinitialize order again. Fixed several memory leaks.
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index 3842757..c377010 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -62,7 +62,14 @@ qmpMainWindow::qmpMainWindow(QWidget *parent) :
qmpMainWindow::~qmpMainWindow()
{
delete pmgr;if(player)delete player;
- if(timer)delete timer;delete ui;
+ if(timer)delete timer;
+ delete helpw;helpw=NULL;
+ delete efxw;efxw=NULL;
+ delete chnlw;chnlw=NULL;
+ delete plistw;plistw=NULL;
+ delete infow;infow=NULL;
+ delete settingsw;settingsw=NULL;
+ delete ui;
}
void qmpMainWindow::init()
@@ -183,12 +190,6 @@ void qmpMainWindow::closeEvent(QCloseEvent *event)
efxw->close();chnlw->close();
plistw->close();infow->close();
settingsw->close();
- delete helpw;helpw=NULL;
- delete efxw;efxw=NULL;
- delete chnlw;chnlw=NULL;
- delete plistw;plistw=NULL;
- delete infow;infow=NULL;
- delete settingsw;settingsw=NULL;
event->accept();
}