Skip to content

Commit

Permalink
fix: invalid object reference on handle
Browse files Browse the repository at this point in the history
  • Loading branch information
oscar-wos committed Nov 10, 2024
1 parent af20434 commit d96c6ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Globals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
2 changes: 1 addition & 1 deletion src/Refiller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<CCSWeaponBase>().VData;
var weaponData = weapon.Value?.As<CCSWeaponBase>().VData;
if (weaponData == null)
continue;
Expand Down

0 comments on commit d96c6ef

Please sign in to comment.