A proposed law that would have allowed college students to record instructors and professors they believe are breaking a law or rule died in a state Senate committee Tuesday night.

Sen. John Moorlach’s bill, which aimed to provide whistleblower safeguards to college students, didn’t get enough support in the California Senate Judiciary Committee.

Moorlach, R-Costa Mesa, and a fellow Republican from San Diego supported the bill, while a Santa Barbara Democrat cast the lone dissenting vote. The remaining four senators abstained, effectively killing the bill. Two other thumbs up were needed to move the bill along.

Moorlach said he wanted students to have the opportunity to record, even in areas or classrooms where they are not authorized to by a state law or a district guideline, “when the absolute need arises.”

“If an instructor stays within the bounds, there should be no concerns,” he wrote in an e-mail late Tuesday night.

Moorlach introduced the bill after a much-publicized controversy at Orange Coast College, where a conservative student secretly recording a human-sexuality-class instructor slamming the election of Donald Trump. The student was suspended and then re-instated.

Various unions representing teachers and faculty argued the bill would allow students to record as a weapon against instructors they don’t like or who have opposing views.

The OCC controversy went viral last December after the campus College Republicans posted clips of the recording online. Those online views led to threats against the instructor, forcing her to temporarily leave her home.

Meanwhile, the student Republican leaders also got threats. In March, profanity-laced graffiti against the former president of their campus group was spray-painted across campus, describing him and the campus GOP as fascists.