summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/regchannel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index acfe5cf91..c4c02ad0e 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -368,7 +368,9 @@ ChannelInfo::~ChannelInfo()
{
if (this->bi && this->c->FindUser(this->bi))
this->bi->Part(this->c);
- this->c->ci = NULL;
+ /* Parting the service bot can cause the channel to go away */
+ if (this->c)
+ this->c->ci = NULL;
}
RegisteredChannelList->erase(this->name);