Ice Cube and son

Production for the N.W.A. biopic, Straight Outta Compton, is underway in Compton, Calif. … and crew members have already gotten a taste of some real-life gang violence last week.

According to, gunfire erupted outside the Compton Courthouse last week — where the crew were setting up — when some local flashed gang signs at a passing car.

The gunmen were not targeting the crew, but bullets came dangerously close to the set… and one nearby civilian was actually hit and collapsed, but is ok.

TMZ says the cast and crew are worried about their safety, but filming will continue this week in a rough area of Compton.