mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-21 20:27:13 +01:00
Allow unbinding of command manager callbacks by passing null.
This commit is contained in:
parent
981e16ad01
commit
46fae978d7
@ -625,8 +625,13 @@ public:
|
||||
*/
|
||||
void SetOnFail(Object & env, Function & func)
|
||||
{
|
||||
// Are we supposed to unbind current callback?
|
||||
if (func.IsNull())
|
||||
{
|
||||
m_OnFail.ReleaseGently();
|
||||
}
|
||||
// Was there a custom environment specified?
|
||||
if (env.IsNull())
|
||||
else if (env.IsNull())
|
||||
{
|
||||
m_OnFail = func;
|
||||
}
|
||||
@ -649,6 +654,11 @@ public:
|
||||
*/
|
||||
void SetOnAuth(Object & env, Function & func)
|
||||
{
|
||||
// Are we supposed to unbind current callback?
|
||||
if (func.IsNull())
|
||||
{
|
||||
m_OnAuth.ReleaseGently();
|
||||
}
|
||||
// Was there a custom environment specified?
|
||||
if (env.IsNull())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user