Small null reference fix

This commit is contained in:
CaptainSegis 2016-10-18 23:11:42 -05:00
parent e16e4d3818
commit 6eb26a68e8
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@
p = BattleScreen.OppPokemon
End If
Dim ability As String = p.Ability.Name.ToLower()
If BattleScreen.FieldEffects.CanUseItem(own) = True Then
If p.Item IsNot Nothing AndAlso BattleScreen.FieldEffects.CanUseItem(own) = True Then
Select Case p.Item.Name.ToLower()
Case "damp rock"
If ability = "drizzle" Or moveName = "rain dance" Then