From 987cb079becbb4f96c831be9895caa67a8d6edaa Mon Sep 17 00:00:00 2001 From: Jarr3 Date: Wed, 6 Nov 2024 06:57:02 +0100 Subject: [PATCH] #121 B2S 2.1.2 Throws System NullReferenceException Check for possible NullReference --- b2sbackglassserver/b2sbackglassserver/Forms/formBackglass.vb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/b2sbackglassserver/b2sbackglassserver/Forms/formBackglass.vb b/b2sbackglassserver/b2sbackglassserver/Forms/formBackglass.vb index c2586a0..847736b 100644 --- a/b2sbackglassserver/b2sbackglassserver/Forms/formBackglass.vb +++ b/b2sbackglassserver/b2sbackglassserver/Forms/formBackglass.vb @@ -1203,9 +1203,8 @@ Public Class formBackglass Dim currentvalue As Integer = CInt(gistringsData.Substring(gistringid, 1)) If gistrings(gistringid) <> currentvalue Then If Not B2SData.UsedAnimationGIStringIDs.ContainsKey(gistringid) AndAlso Not B2SData.UsedRandomAnimationGIStringIDs.ContainsKey(gistringid) Then gistrings(gistringid) = currentvalue - If B2SData.UsedRomGIStringIDs.ContainsKey(gistringid) Then + If B2SData.UsedRomGIStringIDs.ContainsKey(gistringid) AndAlso B2SData.UsedRomGIStringIDs(gistringid) IsNot Nothing Then For Each picbox As B2SPictureBox In B2SData.UsedRomGIStringIDs(gistringid) - 'If picbox IsNot Nothing Then If picbox IsNot Nothing AndAlso (Not B2SData.UseIlluminationLocks OrElse String.IsNullOrEmpty(picbox.GroupName) OrElse Not B2SData.IlluminationLocks.ContainsKey(picbox.GroupName)) Then Dim visible As Boolean = (currentvalue > 4) If picbox.RomInverted Then visible = Not visible