Bug- crashes when there is a tie in a battle

I was in the library fighting the oracle. We both had one pokemon left, both very low hp. He hits my pokemon faints, then his pokemon faints since I was holding a rocky helmet. Game continued and at the next battle i encounter the game crashed for obvious reasons.