Dont trigger event functions if the passed pointer is nil
This commit is contained in:
parent
6ecbae0370
commit
c2d846c2f6
|
@ -51,6 +51,10 @@ namespace PkmnLibSharp.Battling.Events
|
|||
|
||||
private async Task InternalRunner(IntPtr ptr)
|
||||
{
|
||||
if (ptr == IntPtr.Zero)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var wrapped = WrapEventPtr(ptr);
|
||||
await _del.Invoke(wrapped);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue