The potential legal horror story is now over for The Avengers director, The Martian screenwriter and the studio – and even the Ancient Ones are probably pleased. A federal judge has dismissed the copyright infringement case against producer and co-writer Joss Whedon, director and co-writer Drew Goddard and Lionsgate over the 2012 horror pic The Cabin in the Woods.

“The works may both have a core theme of horror, but Cabin’s core of horror is spliced with heavy amounts of comedy and parody,” said Judge Otis Wright II in his September 11 order tossing out novelist Peter Gallagher’s nearly 5-month old case (read it here). The self published novelist had claimed that his The Little White Trip: A Night in the Pines was lifted by Whedon, Goddard and the other defendants for their successful movie.

“Comparing the Book to the Film, the plots, stories, characters, sequence of events, themes, dialogue, and incidents portrayed in the two works are fictional and, in many respects, the elements in the two works are virtually identical,” Gallagher’s lawyers said in the $10 million and more in damages April 13 jury seeking complaint. Gallagher initially started selling Little White Trip on Venice Beach and around Santa Monica and Hollywood Boulevard in 2006, his lawsuit explained. The plaintiff even got a few write ups in local press and says he registered the book with the WGA in July 2007. “These substantially similar elements, coupled with defendants’ access to plaintiff Book, which was widely disseminated in the Southern California are and on the Internet, where it was available for sale on websites such as Amazon.com, leave little doubt that numerous substantive original elements of the Book are copied in the Film.”

After a premiere at SXSW in March 2012, The Cabin in the Woods was released wide by Lionsgate that April 13. Starring Thor himself Chris Hemsworth plus Kristen Connolly, Fran Kranz, Anna Hutchison, Jesse Williams, Richard Jenkins, and Bradley Whitford, the Goddard feature directorial debut focused on five college student friends suddenly finding themselves in a mental and physical nightmare that they didn’t understand – as all good horror pics with a bit more going on do. The movie went on to make over $66 million worldwide and has spawned talk of a possible but as yet unrealized sequel.

The judge, familiar to readers for his role in the now over Superman heirs and Warner Bros battle, really didn’t agree that there was much alike about Gallagher’s book and Whedon and Goddard’s movie.

“The few alleged similarities that are not grossly misstated involve unprotectable forms of expression such as the group going to a cabin or the alpha-male character attempting a risky escape plan to bring back help,” he said in his order last week closing the case. “Accordingly, the list of random similarities only further convinces the Court of one thing; after thorough analysis of both works and application of the extrinsic test, The Cabin in the Woods and The Little White Trip are not substantially similar.”

And, with prejudice, that cabin door is slammed shut …BTW, the Ancient Ones reference at the beginning of this post makes sense if you’ve seen Cabin in the Woods.

Matthew J. Matern and Tagore O. Subramaniam of Manhattan Beach firm Matern Law Group represented Gallagher. Robert H. Rothstein and Elaine K. Kim of L.A.’s Mitchell Silberberg and Knupp LLP represented Whedon, Goddard and Lionsgate.