From b985833aaa144d6e2593067529f9a0dad70cb07b Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Sat, 2 Sep 2023 15:54:11 +0200 Subject: [PATCH] Check for drawObject != null before invoking draw object created event. --- Penumbra/Interop/PathResolving/MetaState.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Penumbra/Interop/PathResolving/MetaState.cs b/Penumbra/Interop/PathResolving/MetaState.cs index 1a257a96..cdf28bbd 100644 --- a/Penumbra/Interop/PathResolving/MetaState.cs +++ b/Penumbra/Interop/PathResolving/MetaState.cs @@ -140,7 +140,7 @@ private void OnCharacterBaseCreated(uint _1, nint _2, nint _3, nint drawObject) { _characterBaseCreateMetaChanges.Dispose(); _characterBaseCreateMetaChanges = DisposableContainer.Empty; - if (_lastCreatedCollection.Valid && _lastCreatedCollection.AssociatedGameObject != nint.Zero) + if (_lastCreatedCollection.Valid && _lastCreatedCollection.AssociatedGameObject != nint.Zero && drawObject != nint.Zero) _communicator.CreatedCharacterBase.Invoke(_lastCreatedCollection.AssociatedGameObject, _lastCreatedCollection.ModCollection, drawObject); _lastCreatedCollection = ResolveData.Invalid;