From 7bff97b3f6487a74d209e65a2b8602ec2ec79b59 Mon Sep 17 00:00:00 2001 From: darkfire006 Date: Fri, 8 Jul 2022 16:23:51 -0500 Subject: [PATCH] Update Daycare.vb fix crash when breeding w no item --- P3D/Screens/Pokemon/Daycare.vb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/P3D/Screens/Pokemon/Daycare.vb b/P3D/Screens/Pokemon/Daycare.vb index e6ef5c61a..63051eeed 100644 --- a/P3D/Screens/Pokemon/Daycare.vb +++ b/P3D/Screens/Pokemon/Daycare.vb @@ -49,24 +49,24 @@ Select Case DittoAsParent Case 0 If parent1.Gender = P3D.Pokemon.Genders.Female Then - If parent1.Item.Name.ToLower() = "everstone" Then + If parent1.Item IsNot Nothing AndAlso parent1.Item.Name.ToLower() = "everstone" Then p.AdditionalData = parent1.AdditionalData - ElseIf parent2.Number = parent1.Number And parent2.Item.Name.ToLower() = "everstone" Then + ElseIf parent2.Number = parent1.Number And parent2.Item IsNot Nothing AndAlso parent2.Item.Name.ToLower() = "everstone" Then p.AdditionalData = parent2.AdditionalData End If Else - If parent2.Item.Name.ToLower() = "everstone" Then + If parent2.Item IsNot Nothing AndAlso parent2.Item.Name.ToLower() = "everstone" Then p.AdditionalData = parent2.AdditionalData - ElseIf parent1.Number = parent2.Number And parent1.Item.Name.ToLower() = "everstone" Then + ElseIf parent1.Number = parent2.Number And parent1.Item IsNot Nothing AndAlso parent1.Item.Name.ToLower() = "everstone" Then p.AdditionalData = parent1.AdditionalData End If End If Case 1 - If parent2.Item.Name.ToLower() = "everstone" Then + If parent2.Item IsNot Nothing AndAlso parent2.Item.Name.ToLower() = "everstone" Then p.AdditionalData = parent2.AdditionalData End If Case 2 - If parent1.Item.Name.ToLower() = "everstone" Then + If parent1.Item IsNot Nothing AndAlso parent1.Item.Name.ToLower() = "everstone" Then p.AdditionalData = parent1.AdditionalData End If End Select