From 40bb446d0238eb0319b409c26377c08eb605e2d2 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Mon, 9 Oct 2023 00:13:23 +0200 Subject: [PATCH] Add Null-Check to fun application. --- Glamourer/State/FunModule.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Glamourer/State/FunModule.cs b/Glamourer/State/FunModule.cs index c92993d..0bbbe49 100644 --- a/Glamourer/State/FunModule.cs +++ b/Glamourer/State/FunModule.cs @@ -92,7 +92,7 @@ public unsafe class FunModule : IDisposable public void ApplyFun(Actor actor, ref CharacterArmor armor, EquipSlot slot) { - if (actor.AsObject->ObjectKind is not (byte)ObjectKind.Player || !actor.IsCharacter) + if (!actor.IsCharacter || actor.AsObject->ObjectKind is not (byte)ObjectKind.Player) return; if (actor.AsCharacter->CharacterData.ModelCharaId != 0) @@ -104,7 +104,7 @@ public unsafe class FunModule : IDisposable public void ApplyFun(Actor actor, Span armor, ref Customize customize) { - if (actor.AsObject->ObjectKind is not (byte)ObjectKind.Player || !actor.IsCharacter) + if (!actor.IsCharacter || actor.AsObject->ObjectKind is not (byte)ObjectKind.Player) return; if (actor.AsCharacter->CharacterData.ModelCharaId != 0) @@ -132,7 +132,7 @@ public unsafe class FunModule : IDisposable public void ApplyFun(Actor actor, ref CharacterWeapon weapon, EquipSlot slot) { - if (actor.AsObject->ObjectKind is not (byte)ObjectKind.Player || !actor.IsCharacter) + if (!actor.IsCharacter || actor.AsObject->ObjectKind is not (byte)ObjectKind.Player) return; if (actor.AsCharacter->CharacterData.ModelCharaId != 0)