From 3fa9fa337e95898f6de25ad8338027270adbab71 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Thu, 25 Aug 2011 23:35:08 -0400 Subject: [PATCH] TWK-441: Try to fix crash where sourcetreeitem would hold on to a dangling parent --- src/sourcetree/items/collectionitem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sourcetree/items/collectionitem.cpp b/src/sourcetree/items/collectionitem.cpp index 3d2c2a6b5..6f85111af 100644 --- a/src/sourcetree/items/collectionitem.cpp +++ b/src/sourcetree/items/collectionitem.cpp @@ -236,6 +236,8 @@ CollectionItem::playlistDeletedInternal( SourceTreeItem* parent, const T& p ) parent->beginRowsRemoved( i, i ); parent->removeChild( pl ); parent->endRowsRemoved(); + + delete pl; break; } }