From 7d4849cc8551946ba7d5f6b4b64de0914d7b59f6 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Sun, 12 May 2013 14:33:17 +0200 Subject: [PATCH] Fix mem leak --- src/mainwindow.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 839fc026..8161e3a7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -696,13 +696,10 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString & MainWindow::~MainWindow() { - if (m_stopmotion) { - delete m_stopmotion; - } + delete m_stopmotion; #ifdef USE_JOGSHUTTLE - if (m_jogProcess) - delete m_jogProcess; + delete m_jogProcess; #endif m_effectStack->slotClipItemSelected(NULL); @@ -3830,6 +3827,7 @@ void MainWindow::slotSaveZone(Render *render, QPoint zone, DocClipBase *baseClip if (QFile::exists(url->url().path())) { if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", url->url().path())) == KMessageBox::No) { slotSaveZone(render, zone, baseClip, url->url()); + delete dialog; return; } } @@ -3855,6 +3853,7 @@ void MainWindow::slotSaveZone(Render *render, QPoint zone, DocClipBase *baseClip } else render->saveZone(url->url(), edit->text(), zone); } + delete dialog; } -- 2.39.2