From: Jean-Baptiste Mardelle Date: Mon, 23 Jul 2012 06:26:23 +0000 (+0200) Subject: slotEditTimeLineGuide: Use QPointer [krazy 14/37] by Mikko Rapeli X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=9716fdce57126712fc4cd32a2312c4250a1028d2;p=kdenlive slotEditTimeLineGuide: Use QPointer [krazy 14/37] by Mikko Rapeli --- diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp index 0fd5623c..8313d813 100644 --- a/src/customtrackview.cpp +++ b/src/customtrackview.cpp @@ -5310,11 +5310,13 @@ void CustomTrackView::slotEditTimeLineGuide() { if (m_dragGuide == NULL) return; CommentedTime guide = m_dragGuide->info(); - 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 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; } void CustomTrackView::slotDeleteGuide(int guidePos)