In a groundbreaking ruling about harassment and social media, a California Appellate Court has upheld the dismissal of a lawsuit against actor and comedian Marlon Wayans over comments made on a film set and a tweet comparing a movie extra to a cartoon character.

The case, Daniel v. Wayans (2017), 8 Cal. App. 5th 367, was based on comments made and a tweet posted by Wayans during the writing and production of A Haunted House 2. Wayans was accused by actor Pierre Daniel of using a racial epithet. The court unanimously ruled that in the context of the word being spoken by a black man to another black man, the word was not an epithet but instead was a term of endearment and was being used as part of the creative process.

“We are very gratified that the court unanimously upheld the ruling dismissing the case against Mr. Wayans. The entertainment industry as a whole can breathe a sigh of relief with this ruling. Creators of content for film, television, and social media will approach their tasks with a sense of greater freedom rather than fear of repercussions for what happens in the writers’ room and on set,” said William Briggs.

This ruling has been covered by The Hollywood Reporter and Law360.