Singer Courtney Love has had her probation on drug and assault charges brought to an early end.
Ms Love said she planned to continue seeing counsellors
Los Angeles Superior Court Judge Rand Rubin told a tearful Love she had earned it by having drug treatment.
Her probation had been due to expire next month in the two drug cases and in 2008 for an assault against a woman. All three cases were dismissed.
Love told the judge: "Thank you for giving me an opportunity. You've been a good, fair judge. Sorry for crying."
Love, 42, is the widow of Nirvana singer Kurt Cobain and singer with rock band Hole.
The judge told her: "Early on in this case, Ms Love, I think you came very close to coming into custody.
"I think you've done very well. You've shown to me you are interested in a much less destructive lifestyle."
He added he was aware she could relapse, but told Love he wanted "to cautiously wish you the best in this matter".
She pleaded guilty in May 2004 and February 2005 to separate charges of being under the influence of cocaine and possessing powerful painkillers without a valid prescription.
In February 2005, she also pleaded no contest to assaulting musician Kristin King.
After back-to-back court hearings, she was sentenced to three years probation for the assault and 18 months probation for the possession charge - to run concurrently.
She had previously been sentenced to 18 months in drug rehabilitation for being under the influence of cocaine.
In September 2005, she was ordered to attend a drug rehabilitation centre in California for 180 days after violating her probation by using drugs.
Lawyers for Ms King argued in court against ending Love's probation and terminating a ban on Love going within 100 yards of Ms King.
Lawyer Gloria Allred told the court: "Ms Love came in and picked up a large glass whisky bottle from the coffee table and poured all the contents of the bottle onto Ms King's body as she lay on the couch.
"The bottle then hit Ms King on the left cheekbone and temple. Ms Love also picked up a large lit candle from the coffee table and threw it at Ms King."
The fact Love had substance abuse problems "does not excuse or justify an unwarranted vicious attack on another human being", Ms Allred added.
"We are glad Ms Love has received the help she needs, but we also felt the protective order should continue."
Love's lawyer Howard Weitzman replied: "We've denied 99.9% of the allegations."
Judge Rubin said he was confident the two women would stay away from each other.