From d96c6efb24b68316a67f543b25c3bbb862d793c5 Mon Sep 17 00:00:00 2001 From: Oscar <29248751+oscar-wos@users.noreply.github.com> Date: Sun, 10 Nov 2024 17:46:01 +0000 Subject: [PATCH] fix: invalid object reference on handle --- src/Globals.cs | 2 +- src/Refiller.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Globals.cs b/src/Globals.cs index 074671d..d2b8791 100644 --- a/src/Globals.cs +++ b/src/Globals.cs @@ -5,5 +5,5 @@ public partial class Refiller public RefillerConfig Config { get; set; } = new(); public override string ModuleName => "Refiller"; public override string ModuleAuthor => "github.com/oscar-wos/Refiller"; - public override string ModuleVersion => "1.0.1"; + public override string ModuleVersion => "1.0.2"; } \ No newline at end of file diff --git a/src/Refiller.cs b/src/Refiller.cs index 26e6193..5fd1fd8 100644 --- a/src/Refiller.cs +++ b/src/Refiller.cs @@ -43,7 +43,7 @@ public HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info) { foreach (var weapon in weapons.Where(w => w != null && w.IsValid)) { - var weaponData = weapon.Value!.As().VData; + var weaponData = weapon.Value?.As().VData; if (weaponData == null) continue;