Fix crash if selecting disabled move

This commit is contained in:
JappaWakka 2025-01-28 09:10:27 +01:00
parent 568d7d62f3
commit 0022bf7455

View File

@ -534,7 +534,7 @@
If MouseHandler.IsInRectangle(New Rectangle(Core.windowSize.Width - 255, 116 + Index * 96, 255, 80)) = True Then
If isSelected = True Then
SoundManager.PlaySound("select")
If Me.Move.Disabled = 0 AndAlso BattleScreen.FieldEffects.OwnEncore = 0 OrElse BattleScreen.FieldEffects.OwnEncoreMove.ID = Move.ID Then
If Me.Move.Disabled = 0 AndAlso BattleScreen.FieldEffects.OwnEncore = 0 OrElse BattleScreen.FieldEffects.OwnEncoreMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OwnEncoreMove.ID = Move.ID Then
Me.ClickAction(BattleScreen)
End If
Else