diff options
Diffstat (limited to 'src/regchannel.cpp')
| -rw-r--r-- | src/regchannel.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 12655533b..38246f5dd 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -361,9 +361,16 @@ ChannelInfo::~ChannelInfo() { if (this->bi && this->c->FindUser(this->bi)) this->bi->Part(this->c); + /* Parting the service bot can cause the channel to go away */ + if (this->c) - this->c->ci = NULL; + { + if (this->c && this->c->CheckDelete()) + delete this->c; + + this->c = NULL; + } } RegisteredChannelList->erase(this->name); |
