mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Allow unbinding of command listener callbacks by passing null.
This commit is contained in:
parent
46fae978d7
commit
e37d01cabd
@ -1649,6 +1649,11 @@ public:
|
||||
{
|
||||
STHROWF("Detached commands cannot store script resources");
|
||||
}
|
||||
// Are we supposed to unbind current callback?
|
||||
else if (func.IsNull())
|
||||
{
|
||||
m_OnExec.ReleaseGently();
|
||||
}
|
||||
// Was there a custom environment specified?
|
||||
else if (env.IsNull())
|
||||
{
|
||||
@ -1678,6 +1683,11 @@ public:
|
||||
{
|
||||
STHROWF("Detached commands cannot store script resources");
|
||||
}
|
||||
// Are we supposed to unbind current callback?
|
||||
else if (func.IsNull())
|
||||
{
|
||||
m_OnAuth.ReleaseGently();
|
||||
}
|
||||
// Was there a custom environment specified?
|
||||
else if (env.IsNull())
|
||||
{
|
||||
@ -1707,6 +1717,11 @@ public:
|
||||
{
|
||||
STHROWF("Detached listeners cannot store script resources");
|
||||
}
|
||||
// Are we supposed to unbind current callback?
|
||||
else if (func.IsNull())
|
||||
{
|
||||
m_OnPost.ReleaseGently();
|
||||
}
|
||||
// Was there a custom environment specified?
|
||||
else if (env.IsNull())
|
||||
{
|
||||
@ -1736,6 +1751,11 @@ public:
|
||||
{
|
||||
STHROWF("Detached listeners cannot store script resources");
|
||||
}
|
||||
// Are we supposed to unbind current callback?
|
||||
else if (func.IsNull())
|
||||
{
|
||||
m_OnFail.ReleaseGently();
|
||||
}
|
||||
// Was there a custom environment specified?
|
||||
else if (env.IsNull())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user