From: Marcus Eggenberger Date: Sat, 22 Dec 2007 15:15:17 +0000 (+0000) Subject: fixed the "QCoreApplication::postEvent: Unexpected null receiver" bug X-Git-Tag: 0.1.0~22 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=4b45582f5d766e7324fe6d2abd260548ef0b9584 fixed the "QCoreApplication::postEvent: Unexpected null receiver" bug --- diff --git a/src/client/treemodel.cpp b/src/client/treemodel.cpp index 3ae2bc3a..a2d1183b 100644 --- a/src/client/treemodel.cpp +++ b/src/client/treemodel.cpp @@ -155,7 +155,13 @@ void AbstractTreeItem::setFlags(Qt::ItemFlags flags) { void AbstractTreeItem::childDestroyed() { AbstractTreeItem *item = static_cast(sender()); - removeChild(item->column(), item->row()); + + if(!item) { + qWarning() << "AbstractTreeItem::childDestroyed() received null pointer!"; + return; + } + _childItems[item->column()].removeAt(item->row()); + _childHash[item->column()].remove(_childHash[item->column()].key(item)); } /*****************************************