a. It shall be unlawful for any person who is the lawful owner or lawful custodian of a weapon, as that term is defined in section 10-311, to store or otherwise place or leave such weapon in such a manner or under circumstances that it is out of his or her immediate possession or control, without having rendered such weapon inoperable by employing a safety locking device. Any person who violates this subdivision shall be guilty of a violation, punishable by imprisonment of not more than ten days or by a fine of not more than two hundred fifty dollars, or both.
b. Any person who violates subdivision a of this section having previously been found guilty of a violation of such subdivision, or under circumstances which create a substantial risk of physical injury to another person, shall be guilty of a misdemeanor punishable by imprisonment of not more than thirty days or by a fine of not more than one thousand dollars, or both.
c. The provisions of this section shall not apply to weapons owned or lawfully possessed by a police officer, as such term is defined in section 1.20 of the criminal procedure law, or a federal law enforcement officer, as such term is defined in section 2.15 of the criminal procedure law.