The bong-toss case against Amanda Bynes will be dismissed if she stays out of trouble for six months and goes to counseling.
A Manhattan judge on Friday allowed the adjournment in contemplation of dismissal, which means the troubled actress does not have to admit guilt. She must attend counseling twice a week for six months.
The "Hairspray" actress didn't appear in court. An affidavit filed on her behalf by attorney Gerald Shargel said she understood the agreement.
Bynes was charged last spring with reckless endangerment and marijuana possession after building managers called police because they said she was smoking pot in the lobby of her Manhattan apartment. When officers entered her 36th-floor apartment, they said they saw her heave a bong out the window.
Shortly after the incident, Bynes traveled to California, where she was hospitalized for a mental evaluation after she started a fire in the driveway of someone's home. After an extended stay at the mental hospital, the former child star was moved to a rehab facility, and she recently left rehab and has been photographed with her parents, who are reportedly caring for her.
The Associated Press contributed to this report.