Have you warmed up your car this winter? In Ohio, it may be illegal.

Chances are, you've recently warmed up your car before leaving the house.

After all, with most days beginning in the single digits, it's hard to resist the temptation to savor the last moments inside while your car idles.

But warming up your car is illegal in Ohio — depending on how you do it.

According to a law enacted in 2004 to combat car thefts, being caught walking away from your vehicle as the motor runs could result in a minor misdemeanor.

The Ohio Revised Code reads:

"No person driving or in charge of a motor vehicle shall permit it to stand unattended without first stopping the engine, locking the ignition, removing the key from the ignition, effectively setting the parking brake, and, when the motor vehicle is standing upon any grade, turning the front wheels to the curb or side of the highway."

The law was relaxed in June through a larger transportation budget bill, which permits Ohioans to leave their vehicles running and unattended if the vehicle is parked on residential property; the vehicle is locked, regardless of where it is parked; or if it's an emergency or public safety vehicle.

So, if you have a remote-starting vehicle, you're safe to warm up your car. If you park on the street and don't have remote start, that's where you can run into problems with the law.

There are similar laws on the books in Indiana and Kentucky, but fines differ depending on the department or jurisdiction.

Related: Frigid? Mechanics say skip warming up your car's engine

More: Cincinnati Police searching for man who stole car with child inside

Correction: A previous version of this article did not include recent revisions to Ohio Revised Code that permit idling in certain situations.