summaryrefslogtreecommitdiff
path: root/src/access.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-02-05 09:45:48 -0500
committerAdam <Adam@anope.org>2013-02-05 09:45:48 -0500
commit25cec015e8276ea6e1de3e290696071fa5c0b66f (patch)
tree536cf9ea6b424a550d0e912c49f8b0619892b5cf /src/access.cpp
parent62e3c8c4f8ccbba3cc6e62fb970d38be25a654e4 (diff)
Made access del by nick and other functions from 326f1a really delete objects
Diffstat (limited to 'src/access.cpp')
-rw-r--r--src/access.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/access.cpp b/src/access.cpp
index 49c49851c..467f37047 100644
--- a/src/access.cpp
+++ b/src/access.cpp
@@ -97,8 +97,12 @@ ChanAccess::ChanAccess(AccessProvider *p) : Serializable("ChanAccess"), provider
ChanAccess::~ChanAccess()
{
- if (ci)
- ci->EraseAccess(this);
+ if (this->ci)
+ {
+ std::vector<ChanAccess *>::iterator it = std::find(this->ci->access->begin(), this->ci->access->end(), this);
+ if (it != this->ci->access->end())
+ this->ci->access->erase(it);
+ }
}
void ChanAccess::Serialize(Serialize::Data &data) const