Console error

Im getting this error on console:

Failed to call hook 'OnFlameExplosion' on plugin 'DeathNotes v6.3.6' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.DeathNotes.OnFlameExplosion (FlameExplosive explosive, BaseEntity baseEntity) [0x00000] in <2949fd5a54124b12b8f5cc733966ab23>:0

at Oxide.Plugins.DeathNotes.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0023f] in <2949fd5a54124b12b8f5cc733966ab23>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b01571c99dce02>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b01571c99dce02>:0

(01:58:53) | Failed to call hook 'OnFlameExplosion' on plugin 'DeathNotes v6.3.6' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.DeathNotes.OnFlameExplosion (FlameExplosive explosive, BaseEntity baseEntity) [0x00000] in <2949fd5a54124b12b8f5cc733966ab23>:0

at Oxide.Plugins.DeathNotes.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0023f] in <2949fd5a54124b12b8f5cc733966ab23>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b01571c99dce02>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b01571c99dce02>:0

(01:58:53) | Failed to call hook 'OnFlameExplosion' on plugin 'DeathNotes v6.3.6' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.DeathNotes.OnFlameExplosion (FlameExplosive explosive, BaseEntity baseEntity) [0x00000] in <2949fd5a54124b12b8f5cc733966ab23>:0

at Oxide.Plugins.DeathNotes.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0023f] in <2949fd5a54124b12b8f5cc733966ab23>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b01571c99dce02>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b01571c99dce02>:0

Im also getting this.

SM1VZsgDQxNB5P8.png DeXGaming

Im also getting this.

The posted null check fixed error message for me

here in the null check fix. credit goes to Steenamaroo

private void OnFlameExplosion(FlameExplosive explosive, BaseEntity baseEntity)
{
    // add this
    if (baseEntity?.gameObject == null || explosive?.creatorEntity == null)
        return;
    //

    var flame = baseEntity.gameObject.AddComponent<Flame>();
    flame.Source = Flame.FlameSource.IncendiaryProjectile;
    flame.SourceEntity = explosive;
    flame.Initiator = explosive.creatorEntity;
}