A visitor to a house in Church Warsop, who opened a toilet window so he could return later to burgle the place, has been jailed for two years.
Heroin addict Martin Neill (36) stole a laptop and mobile phone from the house in Laurel Avenue.
But neighbours spotted him putting a wheeliebin up to the window to climb in and he was picked out later on an identification parade, Nottingham Crown Court was told.
Neill, of Peartree Drive, Shirebrook, who admitted the offence, said he had gone to the house last August to buy amphetamine.
In mitigation, it was said he had already suffered a form of summary justice as the victim of the Church Warsop break-in had assaulted his partner in an attempt to get her laptop back.
Judge Jonathan Teare said Neill had been offending for the last 20 years.