]> git.sesse.net Git - kdenlive/commitdiff
Fix crash when opening project with missing clips that had markers
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 19 Dec 2012 12:23:50 +0000 (13:23 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 19 Dec 2012 12:23:50 +0000 (13:23 +0100)
src/kdenlivedoc.cpp

index dd1a10f9a619e42b40b5a8cdd6ca219c38d1a65f..611d5a36346197744c10581d7d37942839de8534 100644 (file)
@@ -284,7 +284,9 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
                                         e = markerslist.at(k).toElement();
                                         if (e.tagName() == "marker") {
                                            CommentedTime marker(GenTime(e.attribute("time").toDouble()), e.attribute("comment"), e.attribute("type").toInt());
-                                            m_clipManager->getClipById(e.attribute("id"))->addSnapMarker(marker);
+                                           DocClipBase *baseClip = m_clipManager->getClipById(e.attribute("id"));
+                                            if (baseClip) baseClip->addSnapMarker(marker);
+                                           else kDebug()<< " / / Warning, missing clip: "<< e.attribute("id");
                                        }
                                     }
                                     infoXml.removeChild(markers);