DOVER, Del. (AP) — A Delaware judge has dismissed a shareholder lawsuit against sports apparel maker Lululemon Athletica over its decision to give a $5 million severance package to its former CEO rather than fire him for misconduct.

The judge ruled Thursday that the shareholder failed to comply with a Delaware law requiring him to demand that the company’s board take action itself before filing his complaint, or demonstrate that making such a demand would have been futile because the directors were self-interested or acting in bad faith.

Former CEO Laurent Potdevin left Lululemon, which is based in Vancouver, British Columbia, in February 2018. The company provided no details of what led to his resignation, other than that he had fallen short of the company’s standards of conduct.

The judge’s ruling indicates that Lululemon’s board negotiated a separation deal with Potdevin after confirming that he had engaged in “pervasive misconduct.”

The lawsuit alleges that board members rushed to pay an excessive severance fee to facilitate Potdevin’s departure as a way to cover up their slow response to his “well-documented malfeasance.”

The lawsuit alleged that Potdevin created a toxic culture at Lululemon and engaged in a pattern of harassment and sexual favoritism. It also claimed that he turned the company’s executive team into a “boy’s club” that would frequently gather either at his house or hotel rooms for drinks and drugs.

After offering Potdevin a $2.5 million severance payment if he agreed to resign, the board subsequently agreed to pay him double that amount.