I am not aware of a rule that says it is legal however, I am also not aware of a rule that says it is illegal either.
If a battter swings at a pitch and the bat slips out of his hands, are they throwing the bat?
Unless you can prove
that it was done maliciously and created an unsafe condition. Don't go there.