[Kdenlive-devel] [PATCH 07/37] Use QPointer

Mikko Rapeli mikko.rapeli at iki.fi
Thu Jun 28 13:52:45 UTC 2012


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

diff --git a/src/titlewidget.cpp b/src/titlewidget.cpp
index d2e35d8..455471b 100644
--- a/src/titlewidget.cpp
+++ b/src/titlewidget.cpp
@@ -1847,7 +1847,7 @@ void TitleWidget::saveTitle(KUrl url)
         embed_image=true;	
     }
     if (url.isEmpty()) {
-        KFileDialog *fs = new KFileDialog(KUrl(m_projectTitlePath), "application/x-kdenlivetitle", this);
+        QPointer<KFileDialog> fs = new KFileDialog(KUrl(m_projectTitlePath), "application/x-kdenlivetitle", this);
         fs->setOperationMode(KFileDialog::Saving);
         fs->setMode(KFile::File);
         fs->setConfirmOverwrite(true);
-- 
1.7.10.4





More information about the Kdenlive mailing list