diff options
| author | Alezito2008 <92759854+Alezito2008@users.noreply.github.com> | 2026-03-05 04:17:17 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-05 14:17:17 +0700 |
| commit | 87e3bd193cf36c60d411b50ceead4cd6d5079441 (patch) | |
| tree | 44e078b439aabbf3f420d5052037df349a24fa8f /Minecraft.Client/Common/UI | |
| parent | 8cdbf08900a2344c28bca0ae9549d40ea58989fd (diff) | |
Fix beacon crash (#512)
Diffstat (limited to 'Minecraft.Client/Common/UI')
| -rw-r--r-- | Minecraft.Client/Common/UI/IUIScene_BeaconMenu.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Minecraft.Client/Common/UI/IUIScene_BeaconMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_BeaconMenu.cpp index 76d21406..bb13deb8 100644 --- a/Minecraft.Client/Common/UI/IUIScene_BeaconMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_BeaconMenu.cpp @@ -387,8 +387,10 @@ vector<HtmlString> *IUIScene_BeaconMenu::GetSectionHoverText(ESceneSection eSect desc = new vector<HtmlString>(); - HtmlString string( app.GetString(MobEffect::effects[effectId]->getDescriptionId()), eHTMLColor_White ); - desc->push_back( string ); + if (effectId < MobEffect::e_MobEffectIcon_COUNT && MobEffect::effects[effectId]) { + HtmlString string( app.GetString(MobEffect::effects[effectId]->getDescriptionId()), eHTMLColor_White ); + desc->push_back( string ); + } } break; } |
