Steve Helber, Associated Press
FILE - In a Wednesday, Jan. 21, 2015 file photo, Del. Joe Morrissey, I-Henrico, looks over the calendar during the House session at the Capitol in Richmond, Va. Morrissey, who spends his nights in jail, says a measure aimed at keeping pornography out of the hands of inmates would not survive legal challenges

RICHMOND, Va. — A Virginia lawmaker who spends his nights in jail says a measure aimed at keeping pornography out of the hands of inmates would not survive legal challenges.

On Wednesday, Del. Joe Morrissey voted against a bill that would prohibit inmates from possessing obscene material.

The bill passed by a broad majority, and its sponsor says the state's wardens support the measure to keep "hard-core" pornography out of the hands of inmates.

But Morrissey told reporters that the measure won't survive legal challenges and noted that he is a former constitutional law professor.

The 57-year-old was sentenced to six months in jail for contributing to the delinquency of a minor. He is on a work-release program that allows him to spend his days in the General Assembly and his nights in jail.