A 33-year-old Londonderry woman has been given a suspended sentence and barred from keeping animals for 10 years.
Samantha Kerrigan, of Spencer Road in the city's Waterside, admitted causing unnecessary suffering to a dog on or before 1 October 2017.
The judge at Londonderry Magistrates' Court said that if it was not for her health she would have gone to prison.
Kerrigan suffered from addiction issues, the court heard.
The court heard that police were called to an address on Spencer Road after reports of a dog dangling from a first floor window.
Members of the public got a ladder and rescued the female bull terrier.
Police forced their way into the flat, where there was a strong smell of dog excrement.
'Barely able to look after herself'
A vet determined the dog was in danger of falling out of the window and had been neglected with no access to water from being left alone in the flat.
The police gave the animal food and she drank two litres of water in a short space of time.
The defendant contacted police to confirm she owned the animal but failed to attend an interview.
The court was told the dog was euthanized a month later.
A defence solicitor said Kerrigan classed herself as an animal lover.
He said Kerrigan suffered from addiction issues and she was "barely able to look after herself never mind anything else".
The solicitor said the dog was supposed to go to a friend of her partner but he had been sent to prison so she had taken the dog.
He said she was "very upset" when she heard what happened to the dog.