summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/users.cpp b/src/users.cpp
index b179fabdd..4a9ada90d 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -50,11 +50,14 @@ bool userrec::IsInvited(char* channel)
{
for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
{
- if (!strcasecmp(i->channel,channel))
- {
- return true;
+ if (i->channel) {
+ if (!strcasecmp(i->channel,channel))
+ {
+ return true;
+ }
}
}
+ return false;
}
void userrec::InviteTo(char* channel)
@@ -68,10 +71,12 @@ void userrec::RemoveInvite(char* channel)
{
for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
{
- if (!strcasecmp(i->channel,channel))
- {
- invites.erase(i);
- return;
+ if (i->channel) {
+ if (!strcasecmp(i->channel,channel))
+ {
+ invites.erase(i);
+ return;
+ }
}
}
}