To concentrate on, or be aware of, the roof of a building in a dream is to acknowledge the shelter and protection it affords.

If the roof leaks then we are open to emotional attacks.

If we are on the roof we are not being protected and, therefore, could be vulnerable.