Fixes crashes if parent is destroyed. Found by krazy. Details at:
http://blogs.kde.org/node/3919
---
src/customtrackview.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp
index 431370c..3d4d17f 100644
--- a/src/customtrackview.cpp
+++ b/src/customtrackview.cpp
@@ -5982,17 +5982,19 @@ void CustomTrackView::slotDeleteTrack(int ix)
void CustomTrackView::slotConfigTracks(int ix)
{
- TracksConfigDialog d(m_document, ix, parentWidget());
- if (d.exec() == QDialog::Accepted) {
- ConfigTracksCommand *configTracks = new ConfigTracksCommand(this,
m_document->tracksList(), d.tracksList());
+ QPointer<TracksConfigDialog> d = new TracksConfigDialog(m_document,
+ ix, parentWidget());
+ if (d->exec() == QDialog::Accepted) {
+ ConfigTracksCommand *configTracks = new ConfigTracksCommand(this,
m_document->tracksList(), d->tracksList());
m_commandStack->push(configTracks);
- QList <int> toDelete = d.deletedTracks();
+ QList <int> toDelete = d->deletedTracks();
for (int i = 0; i < toDelete.count(); ++i) {
TrackInfo info = m_document->trackInfoAt(m_document->tracksCount()
- toDelete.at(i) + i - 1);
deleteTimelineTrack(toDelete.at(i) - i, info);
}
setDocumentModified();
}
+ delete d;
}
void CustomTrackView::deleteTimelineTrack(int ix, TrackInfo trackinfo)
--
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/kdenlive-devel