]> git.sesse.net Git - kdenlive/commitdiff
corners: Fix crash when adding keyframe after last keyframe
authorTill Theato <root@ttill.de>
Sun, 23 Jan 2011 19:14:10 +0000 (19:14 +0000)
committerTill Theato <root@ttill.de>
Sun, 23 Jan 2011 19:14:10 +0000 (19:14 +0000)
svn path=/trunk/kdenlive/; revision=5349

src/cornerswidget.cpp

index 8eb1e07c6248b8cf2b8fb7048f1884700cd66a4d..9744e3d628835ede8223fbb30a4d72816fc6f988 100644 (file)
@@ -226,9 +226,15 @@ void CornersWidget::slotInsertKeyframe()
             break;
     }
 
-    int pos2 = getPos(row);
-    if (pos2 == m_pos)
-        return;
+
+    int pos2;
+    if (row == keyframe_list->rowCount()) {
+        pos2 = m_max;
+    } else {
+        pos2 = getPos(row);
+        if (pos2 == m_pos)
+            return;
+    }
 
     int pos1 = 0;
     if (row > 0)