Commit 12d1eb7c authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Make sure the document has a valid id on opening

parent 42701f39
......@@ -87,6 +87,12 @@ bool DocumentChecker::hasErrorInClips()
for (int i = 0; i < playlists.count(); ++i) {
if ("id")) == QStringLiteral("main bin")) {
QString documentid = EffectsList::property(, QStringLiteral("kdenlive:docproperties.documentid"));
if (documentid.isEmpty()) {
// invalid document id, recreate one
documentid = QString::number(QDateTime::currentMSecsSinceEpoch());
//TODO: Warn on invalid doc id
EffectsList::setProperty(, QStringLiteral("kdenlive:docproperties.documentid"), documentid);
storageFolder = EffectsList::property(, QStringLiteral("kdenlive:docproperties.storagefolder"));
if (!storageFolder.isEmpty() && !!storageFolder.startsWith(QStringLiteral("/"))) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment