When Olivia Wilde was handed a mysterious envelope on stage midway through her presentation before a packed Las Vegas audience, many assumed it was the set-up for an elaborate joke.

Instead, she was getting served legal papers from her ex-partner Jason Sudeikis.

“This is for me, right?” asked Wilde, interrupted while introducing footage from her upcoming thriller “Don’t Worry Darling” during Warner Bros’ presentation at CinemaCon, the annual movie theater industry gathering.

“Very mysterious. I’m going to open it now,” she said, opening an envelope marked “Personal and Confidential” after it was slid calmly onto the stage by an unknown person.

Glancing at its contents, she asked “Is this a script? OK, got it. Thank you,” before returning to her description of her upcoming thriller, hardly missing a beat.

The envelope was never referred to again during the presentation, prompting speculation that somebody had tried to slip a new screenplay to the actor-director.

But it emerged on Wednesday the document held legal papers concerning two children Wilde has with her former partner Sudeikis, star of television comedy “Ted Lasso.”

“Papers were drawn up to establish jurisdiction relating to the children of Ms. Wilde and Mr. Sudeikis,” a source close to Sudeikis told AFP Wednesday.

“Mr. Sudeikis had no prior knowledge of the time or place that the envelope would have been delivered as this would solely be up to the process service company involved and he would never condone her being served in such an inappropriate manner.”

Wilde’s representatives did not respond to a request for comment.

“Don’t Worry Darling,” a twisty, erotic thriller inspired by “The Truman Show” and “Inception,” stars Harry Styles, who is currently dating Wilde.