]> git.sesse.net Git - kdenlive/commitdiff
slotEditGuide: use QPointer [krazy 13/37] by Mikko Rapeli
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 23 Jul 2012 06:25:48 +0000 (08:25 +0200)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 23 Jul 2012 06:25:48 +0000 (08:25 +0200)
src/customtrackview.cpp

index 72d61bde05f71134a8944882445052f21818a2f5..0fd5623c94111e3c533d96a62ececeef2f548781 100644 (file)
@@ -5297,11 +5297,12 @@ void CustomTrackView::slotEditGuide(int guidePos)
 
 void CustomTrackView::slotEditGuide(CommentedTime guide)
 {
-    MarkerDialog d(NULL, guide, m_document->timecode(), i18n("Edit Guide"), this);
-    if (d.exec() == QDialog::Accepted) {
-        EditGuideCommand *command = new EditGuideCommand(this, guide.time(), guide.comment(), d.newMarker().time(), d.newMarker().comment(), true);
+    QPointer<MarkerDialog> d = new MarkerDialog(NULL, guide, m_document->timecode(), i18n("Edit Guide"), this);
+    if (d->exec() == QDialog::Accepted) {
+        EditGuideCommand *command = new EditGuideCommand(this, guide.time(), guide.comment(), d->newMarker().time(), d->newMarker().comment(), true);
         m_commandStack->push(command);
     }
+    delete d;
 }