Fixes crashes if parent is destroyed. Found by krazy. Details at: http://blogs.kde.org/node/3919
Also delete dialog on exit paths. --- src/mainwindow.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c28579e..b64eba7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1870,12 +1870,16 @@ void MainWindow::newFile(bool showProjectSettings, bool force) if (!closeCurrentDocument()) return; } else { - ProjectSettings *w = new ProjectSettings(NULL, QMap <QString, QString> (), QStringList(), projectTracks.x(), projectTracks.y(), KdenliveSettings::defaultprojectfolder(), false, true, this); - if (w->exec() != QDialog::Accepted) + QPointer<ProjectSettings> w = new ProjectSettings(NULL, QMap <QString, QString> (), QStringList(), projectTracks.x(), projectTracks.y(), KdenliveSettings::defaultprojectfolder(), false, true, this); + if (w->exec() != QDialog::Accepted) { + delete w; return; + } if (!KdenliveSettings::activatetabs()) - if (!closeCurrentDocument()) + if (!closeCurrentDocument()) { + delete w; return; + } if (KdenliveSettings::videothumbnails() != w->enableVideoThumbs()) slotSwitchVideoThumbs(); if (KdenliveSettings::audiothumbnails() != w->enableAudioThumbs()) -- 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