X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=inline;f=src%2Fcommon%2Fircchannel.cpp;h=2233861bd3f8f2d03f1e5bc4bf2bcaa929d2ad4a;hb=988bcf1fc63b31947e3ce816c456c1b1a919d8ef;hp=95d0ed11d208370c3d35327acd14bc5f84a92697;hpb=8a618fb4514d83a76cec8e7cd1319b935366a616;p=quassel.git diff --git a/src/common/ircchannel.cpp b/src/common/ircchannel.cpp index 95d0ed11..2233861b 100644 --- a/src/common/ircchannel.cpp +++ b/src/common/ircchannel.cpp @@ -192,7 +192,11 @@ void IrcChannel::initSetUserModes(const QVariantMap &usermodes) { } void IrcChannel::ircUserDestroyed() { - part(qobject_cast(sender())); + IrcUser *ircUser = qobject_cast(sender()); + // in case this assert triggers we probably need a static_cast + // dynamic_casts seem to screw things up when using the destroyed signal + Q_ASSERT(ircUser); + part(ircUser); } void IrcChannel::setInitialized() {