]> git.sesse.net Git - kdenlive/commitdiff
Fix crash on reset effect
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 30 Mar 2012 18:13:00 +0000 (20:13 +0200)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 30 Mar 2012 18:13:00 +0000 (20:13 +0200)
src/effectstack/effectstackview2.cpp

index e8f0386e95ab850efdc983e20ef3aff6e2d265d4..18cd73fe04f223ac3996ba276a14273267caa299 100644 (file)
@@ -574,7 +574,12 @@ void EffectStackView2::slotResetEffect(int ix)
             emit updateEffect(NULL, m_trackindex, old, dom, ix,false);
         } else {
             m_clipref->initEffect(dom);
-           m_effects.at(ix)->updateWidget(m_clipref->info(), dom, &m_effectMetaInfo);
+            for (int i = 0; i < m_effects.count(); i++) {
+                if (m_effects.at(i)->effectIndex() == ix) {
+                    m_effects.at(i)->updateWidget(m_clipref->info(), dom, &m_effectMetaInfo);
+                    break;
+                }
+            }
             //m_ui.region_url->setUrl(KUrl(dom.attribute("region")));
             emit updateEffect(m_clipref, -1, old, dom, ix,false);
         }