mirror of
https://github.com/anope/anope.git
synced 2026-07-07 18:23:14 +02:00
Fixed crash on access del + valgrind errors
This commit is contained in:
+4
-4
@@ -216,7 +216,7 @@ class serialize_obj : public dynamic_reference_base
|
||||
this->ref->DelReference(this);
|
||||
}
|
||||
|
||||
virtual operator bool() const
|
||||
inline operator bool() const
|
||||
{
|
||||
if (!this->invalid)
|
||||
return this->ref != NULL;
|
||||
@@ -235,7 +235,7 @@ class serialize_obj : public dynamic_reference_base
|
||||
this->ref->AddReference(this);
|
||||
}
|
||||
|
||||
virtual inline operator T*() const
|
||||
inline operator T*() const
|
||||
{
|
||||
if (!this->invalid)
|
||||
{
|
||||
@@ -248,7 +248,7 @@ class serialize_obj : public dynamic_reference_base
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virtual inline T* operator*() const
|
||||
inline T* operator*() const
|
||||
{
|
||||
if (!this->invalid)
|
||||
{
|
||||
@@ -261,7 +261,7 @@ class serialize_obj : public dynamic_reference_base
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virtual inline T* operator->() const
|
||||
inline T* operator->() const
|
||||
{
|
||||
if (!this->invalid)
|
||||
{
|
||||
|
||||
+1
-2
@@ -118,8 +118,7 @@ Serializable* ChanAccess::unserialize(Serializable *obj, Serialize::Data &data)
|
||||
if (obj)
|
||||
access = anope_dynamic_static_cast<ChanAccess *>(obj);
|
||||
else
|
||||
access = const_cast<ChanAccess *>(aprovider->Create());
|
||||
access->provider = aprovider;
|
||||
access = aprovider->Create();
|
||||
access->ci = ci;
|
||||
data["mask"] >> access->mask;
|
||||
data["creator"] >> access->creator;
|
||||
|
||||
+1
-1
@@ -669,7 +669,7 @@ bool Anope::Match(const Anope::string &str, const Anope::string &mask, bool case
|
||||
}
|
||||
}
|
||||
|
||||
if (mask[m] == '*')
|
||||
if (m < mask_len && mask[m] == '*')
|
||||
++m;
|
||||
|
||||
return m == mask_len;
|
||||
|
||||
@@ -638,7 +638,6 @@ void ChannelInfo::EraseAccess(const ChanAccess *taccess)
|
||||
{
|
||||
if (this->GetAccess(i) == taccess)
|
||||
{
|
||||
this->GetAccess(i)->destroy();
|
||||
this->EraseAccess(i);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user