Creature that casts spell after last enemy dies freezes game

My party had a Vicious Wolpertinger which randomly casts a spell after attacking. The Wolpertinger killed the last enemy with a regular attack (a coast watcher) and then the game got stuck after it cast “Mind Tricks.” The music was still playing, but the battle did not progress to the end.