summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp
index fbbe0a25f..0620a9e0c 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -437,6 +437,8 @@ void DeleteOper(userrec* user)
void kill_link(userrec *user,const char* r)
{
user_hash::iterator iter = clientlist.find(user->nick);
+ if (iter == clientlist.end())
+ return;
char reason[MAXBUF];
@@ -495,8 +497,8 @@ void kill_link(userrec *user,const char* r)
}
}
clientlist.erase(iter);
+ delete user;
}
- delete user;
}
WhoWasGroup::WhoWasGroup(userrec* user) : host(NULL), dhost(NULL), ident(NULL), server(NULL), gecos(NULL), signon(user->signon)