BEVERLY HILLS, CA - JULY 29: Actress Sarah Michelle Gellar arrives at the CBS/CW/Showtime Television Critic Association's summer press tour party at 9900 Wilshire Blvd on July 29, 2013 in Beverly Hills, California. (Photo by Gregg DeGuire/WireImage)

Sarah Michelle Gellar was once (sort of) banned from McDonald's.

When the "Buffy the Vampire Slayer" star was a pint-sized commercial actress, Gellar starred in Burger King spots. In these spots, she compared Burger King burgers to those of McDonald's. The result? A lawsuit from McDonald's naming Burger King and Gellar.

"Banned is a strong word," Gellar said in 2004. "When I was five I did a commercial for Burger King. McDonald's were so outraged, they sued Burger King and named me in the lawsuit. I wasn't allowed to eat there. It was tough because, when you're a little kid, McDonald’s is where all your friends have their birthday parties, so I missed out on a lot of apple pies."

Fast forward to 2013 and Gellar is starring alongside Robin Williams in CBS's "The Crazy Ones." The first episode of the David E. Kelley comedy features ad executives Sydney Roberts (Gellar) and Simon Roberts (Williams) working on a new advertising campaign for the fast food chain. McDonald's was not involved in the project. "No money has changed hands -- McDonald's did not have final approval on the script," executive producer Jason Winer told TV critics at the 2013 TCAs.

The pilot features Gellar, Williams and "Mad Men" star James Wolk working with Kelly Clarkson on a new jingle for McDonald's. Check out a preview below.

"The Crazy Ones" premieres Thursday, Sept. 26 at 9 p.m. ET on CBS. h/t BuzzFeed