From a4ce646841b77495654f6943f9906cf8309a1782 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Wed, 24 Jul 2024 23:34:38 -0400 Subject: [PATCH] validate node exists to prevent crash --- components/movies/MovieDetails.bs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/movies/MovieDetails.bs b/components/movies/MovieDetails.bs index de9f86856..26293c01d 100644 --- a/components/movies/MovieDetails.bs +++ b/components/movies/MovieDetails.bs @@ -131,7 +131,8 @@ sub itemContentChanged() else tomato = "pkg:/images/rotten.png" end if - m.top.findNode("criticRatingIcon").uri = tomato + criticRatingIcon = m.top.findNode("criticRatingIcon") + if isValid(criticRatingIcon) then criticRatingIcon.uri = tomato else m.infoGroup.removeChild(m.top.findNode("criticRatingGroup")) end if