]> git.sesse.net Git - kdenlive/commitdiff
Prevent crash on invalid effect
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 7 Oct 2009 15:29:35 +0000 (15:29 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 7 Oct 2009 15:29:35 +0000 (15:29 +0000)
svn path=/trunk/kdenlive/; revision=4009

src/clipitem.cpp

index efb4c00c538cc4e28fb54dc04e028a5800376b0b..be83e6396af5a3e7afbd1f3c222f1531d8ebcd39 100644 (file)
@@ -1274,7 +1274,7 @@ QDomElement ClipItem::getEffectAt(int ix) const
 
 void ClipItem::setEffectAt(int ix, QDomElement effect)
 {
-    if (ix < 0 || ix > (m_effectList.count() - 1)) {
+    if (ix < 0 || ix > (m_effectList.count() - 1) || effect.isNull()) {
         kDebug() << "Invalid effect index: " << ix;
         return;
     }