aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2015-06-21 00:32:54 +0200
committerJean-Baptiste Mardelle <[email protected]>2015-06-21 00:32:54 +0200
commit171cdd8bfba1cbc212351757be2db7e118db37f7 (patch)
treeff549efea9bf9d499812b9b071efbba245f396b1
parent7db832f96b3d837d9fb94713a38785ff1749a826 (diff)
Fix crash when deleting clip with running clipjob
-rw-r--r--src/bin/projectitemmodel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/projectitemmodel.cpp b/src/bin/projectitemmodel.cpp
index cbbf1b8..b991c12 100644
--- a/src/bin/projectitemmodel.cpp
+++ b/src/bin/projectitemmodel.cpp
@@ -286,6 +286,7 @@ QMimeData* ProjectItemModel::mimeData(const QModelIndexList& indices) const
void ProjectItemModel::onAboutToAddItem(AbstractProjectItem* item)
{
AbstractProjectItem *parentItem = item->parent();
+ if (parentItem == NULL) return;
QModelIndex parentIndex;
if (parentItem != m_bin->rootFolder()) {
parentIndex = createIndex(parentItem->index(), 0, parentItem);
@@ -302,6 +303,7 @@ void ProjectItemModel::onItemAdded(AbstractProjectItem* item)
void ProjectItemModel::onAboutToRemoveItem(AbstractProjectItem* item)
{
AbstractProjectItem *parentItem = item->parent();
+ if (parentItem == NULL) return;
QModelIndex parentIndex;
if (parentItem != m_bin->rootFolder()) {
parentIndex = createIndex(parentItem->index(), 0, parentItem);
@@ -321,6 +323,7 @@ void ProjectItemModel::onItemRemoved(AbstractProjectItem* item)
void ProjectItemModel::onItemUpdated(AbstractProjectItem* item)
{
AbstractProjectItem *parentItem = item->parent();
+ if (parentItem == NULL) return;
QModelIndex parentIndex;
if (parentItem != m_bin->rootFolder()) {
parentIndex = createIndex(parentItem->index(), 0, parentItem);