LOS ANGELES — Authorities say a man who hopped atop a car and smashed its windows, while the 4-year-old son of Actress Jaime King was sitting inside, has been charged with battery, child endangerment and vandalism.

Los Angeles County prosecutors said Friday that 47-year-old Paul Floyd could get five years in prison. He has not yet entered a plea, and it’s not clear if he has an attorney who can comment for him.

King said her son, James Knight, was badly shaken but safe after the rampaging man jumped on the car he was sitting in with a friend of King’s in Beverly Hills.

The 38-year-old actress, who first gained fame as a model, has appeared in the films “Pearl Harbor” and “Sin City” and has a role in the forthcoming “Ocean’s 8.”