Dont trigger event functions if the passed pointer is nil
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user