edited error handling
This commit is contained in:
parent
c565a70fb5
commit
8e8cd49001
@ -716,19 +716,17 @@ function onMouseEnter_item(player, param)
|
||||
-- get metadata from library
|
||||
local item = library[contentToShow][index]
|
||||
|
||||
-- error handling
|
||||
-- error handling (only author + description can by empty)
|
||||
if not item
|
||||
or not item.name or item.name == ""
|
||||
or not item.author or item.author == ""
|
||||
or not item.description or item.description == ""
|
||||
or not item.boxsize or item.boxsize == ""
|
||||
or not item.boxart or item.boxart == "" then
|
||||
return
|
||||
end
|
||||
|
||||
UI.setValue("previewTitle", item.name)
|
||||
UI.setValue("previewAuthor", "by " .. item.author)
|
||||
UI.setValue("previewDescription", item.description)
|
||||
UI.setValue("previewAuthor", "by " .. (item.author) or "Unknown")
|
||||
UI.setValue("previewDescription", item.description or "")
|
||||
|
||||
-- update mask according to size
|
||||
local maskData = {}
|
||||
|
Loading…
Reference in New Issue
Block a user