The Stand-In (1985)

"The brilliant Danny Glover stars as Apples Finnerty, a low budget film producer whose life is crumbling. Finnerty can't get work, he's been evicted, and his wife is unfaithful. As he drives into the hills, he gets a flat. A "helpful" stranger turns out to be an armed robber. Apples kills his assailant in self defense and switches identities with him, escaping his own disastrous past. Unfortunately, his new identity is in hot water with the mob. Despite a bright new love interest, Apple looks like a two-time loser until a crime boss creates a surprise ending! Made possible by grants from the American Film Institute and the Rockefeller Foundation."