From 8e8a1d96e4daa37ccb5950e80185000d8735e3b0 Mon Sep 17 00:00:00 2001 From: Adam- Date: Sat, 14 Nov 2009 05:10:34 +0000 Subject: 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 --- src/core/cs_access.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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") -- cgit