Fix PokedexScreen crash after catch

This commit is contained in:
JappaWakka 2024-03-26 18:13:07 +01:00
parent 5b774623c5
commit 6d9138ee38
1 changed files with 36 additions and 33 deletions

View File

@ -1984,6 +1984,8 @@ Public Class PokedexViewScreen
End If End If
If Controls.ShiftPressed = True Or ControllerHandler.ButtonPressed(Buttons.Back) Then If Controls.ShiftPressed = True Or ControllerHandler.ButtonPressed(Buttons.Back) Then
If Me.Forms.Count > 0 Then
Dim OriginalFormIndex As Integer = Me.FormIndex Dim OriginalFormIndex As Integer = Me.FormIndex
Me.FormIndex += 1 Me.FormIndex += 1
@ -2026,6 +2028,7 @@ Public Class PokedexViewScreen
End If End If
End If End If
End If
UpdateIntro() UpdateIntro()
@ -2170,7 +2173,7 @@ Public Class PokedexViewScreen
Private Sub UpdatePage3() Private Sub UpdatePage3()
If Controls.Accept(True, False, False) = True Then If Controls.Accept(True, False, False) = True AndAlso Me.DexIndex > -1 Then
Dim centerVector As Vector2 = Core.GetMiddlePosition(New Size(CInt(64 * scale), CInt(64 * scale))) Dim centerVector As Vector2 = Core.GetMiddlePosition(New Size(CInt(64 * scale), CInt(64 * scale)))
Dim pokemon As Pokemon = Nothing Dim pokemon As Pokemon = Nothing