Sayyiduna Abu Hurayrah (may Allah be pleased with him) relates that the Messenger of Allah (peace and blessings be upon him) said: "When a person prays, let him place something in front of himself. If he does not find anything, let him set up a staff, and if he does not have a staff with him either, let him draw a line. Then nothing that passes in front of him will harm him."
In the same way, Rawh bin al-Qasim and Ibn Uyaynah, in one of the two narrations, and Sufyan al-Thawri narrated this report from Isma'il.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3466