summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <kde@davidedmundson.co.uk>2011-07-01 23:10:25 (GMT)
committerDavid Edmundson <kde@davidedmundson.co.uk>2011-07-02 11:43:28 (GMT)
commit2908a46d9c22e765b2ba03e2f4a4b19615bd063d (patch)
tree55d34e30b261919467268066724f6ef71ce055d6
parente0799a6abef37f463a23a00c40491c6433a632c1 (diff)
downloadkde-telepathy-contact-list-2908a46d9c22e765b2ba03e2f4a4b19615bd063d.tar.gz
kde-telepathy-contact-list-2908a46d9c22e765b2ba03e2f4a4b19615bd063d.tar.xz
Make proxy-tree-node safer. Should hopefully avoid accessing source node after it's deleted.
REVIEW: 101821
-rw-r--r--models/proxy-tree-node.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/proxy-tree-node.cpp b/models/proxy-tree-node.cpp
index ccd7e12..7d8c8e4 100644
--- a/models/proxy-tree-node.cpp
+++ b/models/proxy-tree-node.cpp
@@ -78,6 +78,7 @@ bool ProxyTreeNode::setData(int role, const QVariant &value)
void ProxyTreeNode::onSourceNodeRemoved()
{
+ mPriv->mSource = 0;
int index = parent()->indexOf(this);
emit childrenRemoved(parent(), index, index);
}