Sahl bin Abi Hathmah (may Allah have mercy on him) says that once I saw Muhammad bin Maslamah (may Allah be pleased with him) looking at a woman. I said to him, "You are a companion of the Prophet (peace be upon him), yet you are looking at a non-mahram woman?" He replied, "I heard the Prophet (peace be upon him) say that if Allah puts the thought of sending a marriage proposal to a woman in a person's heart, then there is no harm in looking at her." The previous hadith is also narrated through this second chain.