Amanda Bynes' bong-toss case will be dismissed if she manages to stay out of trouble for six months and goes for regular counseling.
A Manhattan judge allowed an adjournment in contemplation of dismissal which means the 27-year-old actress does not have to admit guilt, CBS News reported.
However, she does have to attend counseling twice a week for six months.
The 'Hairspray' actress didn't appear in court, but an affidavit was filed on her behalf by attorney Gerald Shargel saying that 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.