A Los Angeles judge has thrown out actor Robin Williams’s $6 million lawsuit against indie studio Gold Circle Films, according to court papers filed Thursday. Williams sued Gold Circle back in October 2008, claiming that the production company promised him a $6 million “pay or play” fee for a buddy cop comedy then titled A Couple of Dicks. Gold Circle ultimately decided not to produce the movie, which was subsequently acquired by Warner Bros. and renamed Cop Out for stars Bruce Willis and Tracy Morgan (in theaters Feb. 26). Williams maintained that Gold Circle owed him the $6 million — “pay or play” agreements guarantee that an actor gets paid even if the movie is never made. But Gold Circle managed to prove in court that the two parties never entered “an enforceable agreement as a matter of law.”

“It’s unfortunate that Robin Williams’s attorneys insisted on pursuing this lawsuit when it never should have been filed in the first place,” Gold Circle’s attorney, Michael D. Holtz, told EW. Holtz said he intends to seek recovery of the studio’s costs and attorneys’ fees. Williams’s reps did not immediately return calls for comment.