Fixes crashes if parent is destroyed. Found by krazy. Details at: http://blogs.kde.org/node/3919 --- src/customtrackview.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp index 82715d9..e6b71d5 100644 --- a/src/customtrackview.cpp +++ b/src/customtrackview.cpp @@ -3183,10 +3183,15 @@ void CustomTrackView::slotInsertSpace() pos = GenTime((int)(mapToScene(m_menuPosition).x()), m_document->fps()); track = (int)(mapToScene(m_menuPosition).y() / m_tracksHeight) + 1; } - SpacerDialog d(GenTime(65, m_document->fps()), m_document->timecode(), track, m_document->tracksList(), this); - if (d.exec() != QDialog::Accepted) return; - GenTime spaceDuration = d.selectedDuration(); - track = d.selectedTrack(); + QPointer<SpacerDialog> d = new SpacerDialog(GenTime(65, m_document->fps()), + m_document->timecode(), track, m_document->tracksList(), this); + if (d->exec() != QDialog::Accepted) { + delete d; + return; + } + GenTime spaceDuration = d->selectedDuration(); + track = d->selectedTrack(); + delete d; QList<QGraphicsItem *> items; if (track >= 0) { -- 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