ensure vars are valid - fixes crashlog line 416 + 433

This commit is contained in:
Charles Ewert 2023-03-02 13:04:06 -05:00
parent 49d0f678e3
commit 9329c857a2

View File

@ -462,12 +462,14 @@ sub Main (args as dynamic) as void
end if
else if btn <> invalid and btn.id = "watched-button"
movie = group.itemContent
if isValid(movie?.watched) and isValid(movie?.id)
if movie.watched
UnmarkItemWatched(movie.id)
else
MarkItemWatched(movie.id)
end if
movie.watched = not movie.watched
end if
else if btn <> invalid and btn.id = "favorite-button"
movie = group.itemContent
if movie.favorite