fix: Prevent end poem crash (#1489)

Removed player name check that always fails to work on non host instances
This commit is contained in:
Us3ful"-Dev 2026-04-13 05:53:39 +02:00 committed by GitHub
parent 9e6e3de338
commit e730033bcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,14 +50,7 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void *initData, UILayer *parentLayer)
Minecraft *pMinecraft = Minecraft::GetInstance(); Minecraft *pMinecraft = Minecraft::GetInstance();
wstring playerName = L""; wstring playerName = L"";
if(pMinecraft->localplayers[ui.GetWinUserIndex()] != nullptr) playerName = escapeXML( pMinecraft->localplayers[ProfileManager.GetPrimaryPad()]->getDisplayName() );
{
playerName = escapeXML( pMinecraft->localplayers[ui.GetWinUserIndex()]->getDisplayName() );
}
else
{
playerName = escapeXML( pMinecraft->localplayers[ProfileManager.GetPrimaryPad()]->getDisplayName() );
}
noNoiseString = replaceAll(noNoiseString,L"{*PLAYER*}",playerName); noNoiseString = replaceAll(noNoiseString,L"{*PLAYER*}",playerName);
Random random(8124371); Random random(8124371);