make sure we don't trash the project file if something is wrong in MLT, see issue:

svn path=/trunk/kdenlive/; revision=4302
parent 75112d0c
......@@ -481,6 +481,11 @@ bool KdenliveDoc::saveSceneList(const QString &path, const QString &scene)
QDomDocument sceneList;
sceneList.setContent(scene, true);
QDomElement mlt = sceneList.firstChildElement("mlt");
if (mlt.isNull() || !mlt.hasChildNodes()) {
//Make sure we don't save if scenelist is corrupted
KMessageBox::error(kapp->activeWindow(), i18n("Cannot write to file %1", path));
return false;
QDomElement addedXml = sceneList.createElement("kdenlivedoc");
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment