]> git.sesse.net Git - kdenlive/commitdiff
Fix crash on files rejected by MLT:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 2 Dec 2008 23:21:41 +0000 (23:21 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 2 Dec 2008 23:21:41 +0000 (23:21 +0000)
http://www.kdenlive.org:80/mantis/view.php?id=422

svn path=/branches/KDE4/; revision=2752

src/renderer.cpp

index 37011c5ee64e080505fd6ea60086be5a97539baa..581adff37320c2b70f5ddc26043dc656f5480a1b 100644 (file)
@@ -518,13 +518,15 @@ void Render::getFileProperties(const QDomElement &xml, const QString &clipId) {
         }
         //}
     }
-    if (xml.hasAttribute("out")) producer->set_in_and_out(xml.attribute("in").toInt(), xml.attribute("out").toInt());
 
-    if (producer->is_blank() || !producer->is_valid()) {
+    if (producer == NULL || producer->is_blank() || !producer->is_valid()) {
         kDebug() << " / / / / / / / /ERRROR / / / / // CANNOT LOAD PRODUCER: ";
         emit removeInvalidClip(clipId);
         return;
     }
+
+    if (xml.hasAttribute("out")) producer->set_in_and_out(xml.attribute("in").toInt(), xml.attribute("out").toInt());
+
     char *tmp = decodedString(clipId);
     producer->set("id", tmp);
     delete[] tmp;