]> git.sesse.net Git - kdenlive/blobdiff - src/projectlistview.cpp
Fix crash introduced by recent commit
[kdenlive] / src / projectlistview.cpp
index 6b2b5abb2826365f8b781e57aa2b4c352d4e562c..b050630580c7197e11f0153e1d4c43381096a28a 100644 (file)
@@ -115,9 +115,12 @@ void ProjectListView::contextMenuEvent(QContextMenuEvent * event)
 void ProjectListView::mouseDoubleClickEvent(QMouseEvent * event)
 {
     ProjectItem *item = static_cast <ProjectItem *>(itemAt(event->pos()));
-    if (!item) emit addClip();
+    if (!item) {
+       emit addClip();
+       return;
+    }
     if (!(item->flags() & Qt::ItemIsDragEnabled)) return;
-    else if (item->isGroup()) {
+    if (item->isGroup()) {
         if ((columnAt(event->pos().x()) == 1)) QTreeWidget::mouseDoubleClickEvent(event);
     } else {
         if ((columnAt(event->pos().x()) == 1) && (item->clipType() == SLIDESHOW || item->clipType() == TEXT || item->clipType() == COLOR)) QTreeWidget::mouseDoubleClickEvent(event);