From 0cdc628db05cc7391c6114c46c52d65d90603571 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 25 Apr 2011 15:58:46 -0400 Subject: Fixed crash when certain nicks expire --- src/chanserv.cpp | 3 ++- src/nickserv.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/chanserv.cpp b/src/chanserv.cpp index e519cb8b2..06ef6e83c 100644 --- a/src/chanserv.cpp +++ b/src/chanserv.cpp @@ -406,9 +406,10 @@ void expire_chans() // XXX this is slightly inefficient void cs_remove_nick(NickCore *nc) { - for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it) + for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(); it != RegisteredChannelList.end();) { ChannelInfo *ci = it->second; + ++it; ChanAccess *access = ci->GetAccess(nc); if (access) diff --git a/src/nickserv.cpp b/src/nickserv.cpp index 870ea6d2c..f5095c53d 100644 --- a/src/nickserv.cpp +++ b/src/nickserv.cpp @@ -243,7 +243,7 @@ int validate_user(User *u) void expire_nicks() { - for (nickalias_map::const_iterator it = NickAliasList.begin(), it_end = NickAliasList.end(); it != it_end; ) + for (nickalias_map::const_iterator it = NickAliasList.begin(); it != NickAliasList.end();) { NickAlias *na = it->second; ++it; -- cgit