Can I be charged for a gun that wasn't mine in the car?
Possibly, and it's the same analysis that governs drugs in a car.
Ownership is not the same as possession. The State must prove knowledge of the firearm's presence and the ability to exercise control over it — as to each person in the vehicle, individually.
In a jointly occupied vehicle, knowledge and control generally can't be inferred from presence alone. The State needs something more connecting a particular person to a particular firearm: statements, proximity to that specific location, fingerprints or DNA, ownership of the container it was in, or conduct suggesting awareness.
Where it gets serious quickly: a prohibited person in a vehicle containing a firearm faces felony exposure even if someone else brought it. The charge doesn't require ownership.
Practical point for anyone with a prior conviction — riding in a vehicle where you don't know what's inside is a genuine risk, and it's worth knowing before the stop rather than after.
If you have a prior, know what's in the car before you get in it. ---
Talk to an Attorney — Free
An answer on a page isn't the same as advice about your case. Talk to an attorney who handles these matters on the Treasure Coast — free and confidential.
