X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Ftreemodel.cpp;fp=src%2Fclient%2Ftreemodel.cpp;h=6ab70e62cf79c93474b7882a5a9b100b86d35b02;hb=036f2bed90b26672119eedb0f73693d322a8ac9c;hp=cc1b08a873f8f8c7b1e3bf5adc2597fd93689c35;hpb=02b4f33429788d35500454bfb5a8a9ab0a2a2b49;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); }