X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Ftreemodel.cpp;h=6ab70e62cf79c93474b7882a5a9b100b86d35b02;hb=d54b44bc5b6e1ff4308f9d143babf29028ae47cd;hp=cc1b08a873f8f8c7b1e3bf5adc2597fd93689c35;hpb=6f4a6454e49db703bd6336f575bbbeff95388404;p=quassel.git diff --git a/src/client/treemodel.cpp b/src/client/treemodel.cpp index cc1b08a8..6ab70e62 100644 --- a/src/client/treemodel.cpp +++ b/src/client/treemodel.cpp @@ -127,6 +127,10 @@ void AbstractTreeItem::customEvent(QEvent *event) { if(childRow == -1) return; + // since we are called asynchronously we have to recheck if the item in question still has no childs + if(removeEvent->child()->childCount()) + return; + removeChild(childRow); }