summaryrefslogtreecommitdiff
path: root/src/core/cs_access.c
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-14 05:10:34 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-14 05:10:34 +0000
commit8e8a1d96e4daa37ccb5950e80185000d8735e3b0 (patch)
tree67694e1c201829d347841f8cc66f3d33401db327 /src/core/cs_access.c
parent842b5609dc99f475d080fc6679a269646b089da5 (diff)
Fixed potential segfault when deleting users from the access list by number, reported by Cronus
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2650 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/cs_access.c')
-rw-r--r--src/core/cs_access.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/cs_access.c b/src/core/cs_access.c
index 00af72a88..08680a989 100644
--- a/src/core/cs_access.c
+++ b/src/core/cs_access.c
@@ -324,7 +324,12 @@ class CommandCSAccess : public Command
/* We don't know the nick if someone used numbers, so we trigger the event without
* nick param. We just do this once, even if someone enters a range. -Certus */
- FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, u, (na->nick ? na->nick : NULL)));
+ /* Only call this event if na exists (if they deleted by user, not numlist).
+ * The callback for deleting by numlist will call this event otherwise - Adam */
+ if (na)
+ {
+ FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, u, na->nick));
+ }
}
}
else if (cmd == "LIST")