summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-12-05 20:13:35 (GMT)
committerMontel Laurent <montel@kde.org>2016-12-05 20:13:35 (GMT)
commit989dacdf466e494951057868477d9b1a605fdda9 (patch)
tree3787044beb2acb43599956983e985df20049694f
parentd7e2372daa82f69b06d17546800a2e7f3a26a24c (diff)
Don't execute code if we cancel savefile dialogbox
-rw-r--r--src/renderer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/renderer.cpp b/src/renderer.cpp
index e86f4b1..d5f64bc 100644
--- a/src/renderer.cpp
+++ b/src/renderer.cpp
@@ -584,6 +584,9 @@ void Render::saveZone(const QString projectFolder, QPoint zone)
clipFolder = QDir::homePath();
}
QString url = QFileDialog::getSaveFileName(qApp->activeWindow(), i18n("Save Zone"), clipFolder, i18n("MLT playlist (*.mlt)"));
+ if (url.isEmpty()) {
+ return;
+ }
Mlt::Consumer xmlConsumer(*m_qmlView->profile(), ("xml:" + url).toUtf8().constData());
xmlConsumer.set("terminate_on_pause", 1);
m_mltProducer->optimise();