(59) باب إِذَا هَمَّ الْعَبْدُ بِحَسَنَةٍ كُتِبَتْ وَإِذَا هَمَّ بِسَيِّئَةٍ لَمْ تُكْتَبْ
This hadith has been narrated with another chain of transmitters with the addition of these words:
Allah would even wipe out (the evil committed by a man) and Allah does not put to destruction anyone except he who is doomed to destruction. (DE)
Reference (DE): Sahih Muslim 131 b (DE)
In-book reference (DE): Book 1, Hadith 246 (DE)
USC-MSA web (English) reference(deprecated numbering scheme): Book 1, Hadith 238 (DE)