From 055afcb59c5fc5c6cefdaf6fa2fe53f5032ac9f6 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Thu, 19 Nov 2009 19:56:54 +0000 Subject: [PATCH 1/1] Fix crash when dropping folder in project tree: http://kdenlive.org/mantis/view.php?id=1287 svn path=/trunk/kdenlive/; revision=4139 --- src/projectlist.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/projectlist.cpp b/src/projectlist.cpp index 9a2d514b..f150cb99 100644 --- a/src/projectlist.cpp +++ b/src/projectlist.cpp @@ -802,6 +802,16 @@ void ProjectList::slotAddClip(const QList givenList, const QString &group for (int i = 0; i < givenList.count(); i++) list << givenList.at(i); } + + foreach(const KUrl &file, list) { + // Check there is no folder here + KMimeType::Ptr type = KMimeType::findByUrl(file); + if (type->is("inode/directory")) { + // user dropped a folder + list.removeAll(file); + } + } + if (list.isEmpty()) return; if (givenList.isEmpty()) { -- 2.39.2