diff --git a/P3D/Player/Player.vb b/P3D/Player/Player.vb index 9822ef353..c907b227c 100644 --- a/P3D/Player/Player.vb +++ b/P3D/Player/Player.vb @@ -1756,9 +1756,11 @@ If CanFireStepEvent() = True Then Dim addEggSteps As Integer = stepAmount For Each p As Pokemon In Pokemons - If p.Ability.Name.ToLower() = "magma armor" Or p.Ability.Name.ToLower() = "flame body" Then - addEggSteps *= Random.Next(1, 4) - Exit For + If p.Ability IsNot Nothing Then + If p.Ability.Name.ToLower() = "magma armor" OrElse p.Ability.Name.ToLower() = "flame body" Then + addEggSteps *= Random.Next(1, 4) + Exit For + End If End If Next diff --git a/P3D/Screens/MainMenu/PauseScreen.vb b/P3D/Screens/MainMenu/PauseScreen.vb index 1e7b42640..c3fed6768 100644 --- a/P3D/Screens/MainMenu/PauseScreen.vb +++ b/P3D/Screens/MainMenu/PauseScreen.vb @@ -25,7 +25,7 @@ If Core.Player.IsGameJoltSave = True Then Me.canCreateAutosave = False Else - If Not Me.PreScreen Is Nothing Then + If Me.PreScreen IsNot Nothing AndAlso Camera.Name IsNot Nothing Then If Camera.Name <> "Overworld" Then Me.canCreateAutosave = False Else