- if(add) {
- bool handledByNetsplit = false;
- if(!_netsplits.empty()) {
- foreach(Netsplit* n, _netsplits) {
- handledByNetsplit = n->userAlreadyJoined(ircUser->hostmask(), channel->name());
- if(handledByNetsplit) {
- n->addMode(ircUser->hostmask(), channel->name(), QString(modes[c]));
- break;
+ if(!ircUser) {
+ qWarning() << Q_FUNC_INFO << "Unknown IrcUser:" << params[paramOffset];
+ } else {
+ if(add) {
+ bool handledByNetsplit = false;
+ if(!_netsplits.empty()) {
+ foreach(Netsplit* n, _netsplits) {
+ handledByNetsplit = n->userAlreadyJoined(ircUser->hostmask(), channel->name());
+ if(handledByNetsplit) {
+ n->addMode(ircUser->hostmask(), channel->name(), QString(modes[c]));
+ break;
+ }