Git commit 12d1eb7ca5bd24ad88115c5cb6321f6a86cbe3d2 by Jean-Baptiste Mardel= le. Committed on 04/12/2016 at 20:35. Pushed by mardelle into branch 'Applications/16.12'. Make sure the document has a valid id on opening M +6 -0 src/doc/documentchecker.cpp https://commits.kde.org/kdenlive/12d1eb7ca5bd24ad88115c5cb6321f6a86cbe3d2 diff --git a/src/doc/documentchecker.cpp b/src/doc/documentchecker.cpp index 0900085..b4602b2 100644 --- a/src/doc/documentchecker.cpp +++ b/src/doc/documentchecker.cpp @@ -87,6 +87,12 @@ bool DocumentChecker::hasErrorInClips() for (int i =3D 0; i < playlists.count(); ++i) { if (playlists.at(i).toElement().attribute(QStringLiteral("id")) = =3D=3D QStringLiteral("main bin")) { QString documentid =3D EffectsList::property(playlists.at(i).t= oElement(), QStringLiteral("kdenlive:docproperties.documentid")); + if (documentid.isEmpty()) { + // invalid document id, recreate one + documentid =3D QString::number(QDateTime::currentMSecsSinc= eEpoch()); + //TODO: Warn on invalid doc id + EffectsList::setProperty(playlists.at(i).toElement(), QStr= ingLiteral("kdenlive:docproperties.documentid"), documentid); + } storageFolder =3D EffectsList::property(playlists.at(i).toElem= ent(), QStringLiteral("kdenlive:docproperties.storagefolder")); if (!storageFolder.isEmpty() && !!storageFolder.startsWith(QSt= ringLiteral("/"))) { storageFolder.prepend(root);