mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2025-02-19 22:41:47 +00:00
validate node ref to prevent crash
This commit is contained in:
parent
6347149496
commit
fba290fed6
@ -30,7 +30,7 @@ sub init()
|
||||
end if
|
||||
|
||||
' update the backdrop node
|
||||
m.backdrop = m.top.findNode("backdrop")
|
||||
initBackdrop()
|
||||
m.backdrop.color = backdropColor
|
||||
end sub
|
||||
|
||||
@ -46,6 +46,10 @@ sub initItemTextExtra()
|
||||
m.itemTextExtra = m.top.findNode("itemTextExtra")
|
||||
end sub
|
||||
|
||||
sub initBackdrop()
|
||||
m.backdrop = m.top.findNode("backdrop")
|
||||
end sub
|
||||
|
||||
sub itemContentChanged()
|
||||
if isValid(m.unplayedCount) then m.unplayedCount.visible = false
|
||||
itemData = m.top.itemContent
|
||||
@ -58,6 +62,7 @@ sub itemContentChanged()
|
||||
if not isValid(m.itemPoster) then initItemPoster()
|
||||
if not isValid(m.itemText) then initItemText()
|
||||
if not isValid(m.itemTextExtra) then initItemTextExtra()
|
||||
if not isValid(m.backdrop) then initBackdrop()
|
||||
|
||||
m.itemPoster.width = itemData.imageWidth
|
||||
m.itemText.maxWidth = itemData.imageWidth
|
||||
|
Loading…
x
Reference in New Issue
Block a user