It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that he (peace and blessings be upon him) said: "My Ummah will not be held to account for the whisperings that arise in its heart, or what it says to itself, so long as it does not speak of it or act upon it."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3869