summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bots.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bots.cpp b/src/bots.cpp
index 2f6c916a7..94b688f0d 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -62,9 +62,9 @@ BotInfo::~BotInfo()
IRCD->SendSQLineDel(&x);
}
- for (std::set<ChannelInfo *>::iterator it = this->channels->begin(), it_end = this->channels->end(); it != it_end; ++it)
+ for (std::set<ChannelInfo *>::iterator it = this->channels->begin(), it_end = this->channels->end(); it != it_end;)
{
- ChannelInfo *ci = *it;
+ ChannelInfo *ci = *it++;
this->UnAssign(NULL, ci);
}