Fixes crashes if parent is destroyed. Found by krazy. Details at:
http://blogs.kde.org/node/3919
---
 src/mainwindow.cpp |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 81228a9..4529d9b 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -2220,8 +2220,9 @@ void MainWindow::parseProfiles(const QString &mltPath)
 
     if (KdenliveSettings::rendererpath().isEmpty()) {
         // Cannot find the MLT melt renderer, ask for location
-        KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(QString(), 
i18n("Cannot find the melt program required for rendering (part of MLT)"), 
this);
+        QPointer<KUrlRequesterDialog> getUrl = new 
KUrlRequesterDialog(QString(), i18n("Cannot find the melt program required for 
rendering (part of MLT)"), this);
         if (getUrl->exec() == QDialog::Rejected) {
+            delete getUrl;
             ::exit(0);
         }
         KUrl rendererPath = getUrl->selectedUrl();
@@ -2243,9 +2244,10 @@ void MainWindow::parseProfiles(const QString &mltPath)
         }
         if (profilesList.isEmpty()) {
             // Cannot find the MLT profiles, ask for location
-            KUrlRequesterDialog *getUrl = new 
KUrlRequesterDialog(KdenliveSettings::mltpath(), i18n("Cannot find your MLT 
profiles, please give the path"), this);
+            QPointer<KUrlRequesterDialog> getUrl = new 
KUrlRequesterDialog(KdenliveSettings::mltpath(), i18n("Cannot find your MLT 
profiles, please give the path"), this);
             getUrl->fileDialog()->setMode(KFile::Directory);
             if (getUrl->exec() == QDialog::Rejected) {
+                delete getUrl;
                 ::exit(0);
             }
             KUrl mltPath = getUrl->selectedUrl();
-- 
1.7.10.4


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Kdenlive-devel mailing list
Kdenlive-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kdenlive-devel

Reply via email to