It is narrated from Sayyiduna al-'Urs bin Umayrah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "When a sin is committed on earth, whoever witnesses it and disapproves of it is like one who was absent from it; and whoever is absent from it but is pleased with it is like one who witnessed it."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 14417