]> git.sesse.net Git - kdenlive/commitdiff
Fix crash introduced by recent commit
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 9 Apr 2009 15:29:01 +0000 (15:29 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 9 Apr 2009 15:29:01 +0000 (15:29 +0000)
svn path=/trunk/kdenlive/; revision=3267

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);