Sunan Abi Dawud, Book 43, Hadith 269 (Abu Dawud 5043)

Narrated Ali ibn Shayban:

The Prophet (ﷺ) said: If anyone spends the night on the roof of a house with no stone palisade, Allah's responsibility to guard him no longer applies.