From kde-commits Fri Oct 21 06:19:24 2016 From: Christoph Cullmann Date: Fri, 21 Oct 2016 06:19:24 +0000 To: kde-commits Subject: [kate] addons/filetree: fix segfault in ProxyItem::remChild by double-removing the same item Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=147703077302559 Git commit 1a14f27fd626451c3ac0c24b0ec594c0e2dbe7db by Christoph Cullmann. Committed on 21/10/2016 at 06:18. Pushed by cullmann into branch 'master'. fix segfault in ProxyItem::remChild by double-removing the same item M +2 -1 addons/filetree/katefiletreemodel.cpp http://commits.kde.org/kate/1a14f27fd626451c3ac0c24b0ec594c0e2dbe7db diff --git a/addons/filetree/katefiletreemodel.cpp b/addons/filetree/katefi= letreemodel.cpp index 8fbdab0..db1df32 100644 --- a/addons/filetree/katefiletreemodel.cpp +++ b/addons/filetree/katefiletreemodel.cpp @@ -1164,7 +1164,8 @@ void KateFileTreeModel::handleDuplicitRootDisplay(Pro= xyItemDir *init) const QString xy =3D rdir + QLatin1Char('/'); if (node->path().startsWith(xy)) { beginRemoveRows(QModelIndex(), node->row(), no= de->row()); - check_root_removed =3D node =3D=3D check_root; + // check_root_removed must be sticky + check_root_removed =3D check_root_removed || (= node =3D=3D check_root); m_root->remChild(node); endRemoveRows(); insertItemInto(irdir, node);