From fee60aae1b6c9f9f03378a53193c980a1aa2920b Mon Sep 17 00:00:00 2001 From: qingyu <62042544+dreamguxiang@users.noreply.github.com> Date: Sun, 19 Mar 2023 19:26:15 +0800 Subject: [PATCH] fix: fix crash #1130 --- LiteLoader/include/llapi/mc/WeakStorageEntity.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LiteLoader/include/llapi/mc/WeakStorageEntity.hpp b/LiteLoader/include/llapi/mc/WeakStorageEntity.hpp index f2c8acaa82..63f809f536 100644 --- a/LiteLoader/include/llapi/mc/WeakStorageEntity.hpp +++ b/LiteLoader/include/llapi/mc/WeakStorageEntity.hpp @@ -36,9 +36,9 @@ class WeakStorageEntity { inline Entity* tryUnwrap() { StackResultStorageEntity ref(*this); if (!ref._hasValue()) { - return Entity::tryGetFromEntity(ref._getStackRef(), Unknown); + return nullptr; } - return nullptr; + return Entity::tryGetFromEntity(ref._getStackRef(), Unknown); } #undef AFTER_EXTRA