[Kdenlive-devel] [PATCH 31/37] slotOpenBackupDialog: Use QPointer
Mikko Rapeli
mikko.rapeli at iki.fi
Thu Jun 28 13:53:09 UTC 2012
Fixes crashes if parent is destroyed. Found by krazy. Details at:
http://blogs.kde.org/node/3919
---
src/mainwindow.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index aba469b..f15afb1 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -4470,7 +4470,7 @@ void MainWindow::slotOpenBackupDialog(const KUrl url)
projectId = m_activeDocument->getDocumentProperty("documentid");
}
- BackupWidget *dia = new BackupWidget(projectFile, projectFolder, projectId, this);
+ QPointer<BackupWidget> dia = new BackupWidget(projectFile, projectFolder, projectId, this);
if (dia->exec() == QDialog::Accepted) {
QString requestedBackup = dia->selectedFile();
m_activeDocument->backupLastSavedVersion(projectFile.path());
--
1.7.10.4
More information about the Kdenlive
mailing list