Fixed error caused by controller icons displayed in the main-menu item description feature

This commit is contained in:
Wofsauge committed 2024-06-17 19:06:27 +02:00
1 parent 8c98f42726
commit be92c8324d
1 file changed
+1 -1
+1 -1
View File
@@ -160,7 +160,7 @@ EID.TextReplacementPairs = {
local controllerSprites = Sprite()
controllerSprites:Load("gfx/ui/buttons.anm2", true)
local function getControllerSprite()
return (EID.player.ControllerIndex > 0 and controllerSprites) or EID.InlineIconSprite
return (EID.player and EID.player.ControllerIndex > 0 and controllerSprites) or EID.InlineIconSprite
end
--Format: [SHORTCUT]= {Animationname, Frame, Width, Height, LeftOffset [Default: -1], TopOffset [Default: 0], SpriteObject [Default: EID.InlineIconSprite]}