The laws of the game state:
"A player who commits a cautionable or sending-off offence, either on or off
the fi eld of play, whether directed towards an opponent, a team-mate, the
referee, an assistant referee or any other person, is disciplined according to the
nature of the offence committed."
It doesn't matter that the person "offended" against was not a participant in the game.
It comes down to whether the player was guilty of violent conduct or not.