Good news for Amanda Bynes: As the actress is living with her parents in LA and recovering after being released from an inpatient mental health center, a judge in New York has ruled that her bong-throwing case will be dismissed, if Bynes stays out of trouble for six months and agrees to attend therapy twice a week.

Though Bynes did not appear in court, her attorney, Gerarld Shargal, presented the judge with a signed affidavit stating that she understood the agreement. "This is an important step in her rehabilitation and she is pleased with the result," Shargal told reporters outside of court.

The judge has reportedly allowed adjournment in the case, meaning Bynes does not have to plead guilty to any charges. If she does not follow the terms of the agreement—staying out of trouble and attending therapy—the deal is immediately off.

Bynes was arrested in May 2013 under charges of reckless endangerment and marijuana possession after she threw a bong out of the window of her 33rd floor NYC apartment while cops were present. Shortly after, she flew to LA where she was arrested for setting fire to a residential driveway, and then taken to a psychiatric where she was reportedly treated for schizophrenia. She has since been released, and is living with her parents while she plans to enroll in fashion school.

[via ABC News]