Qais says that once Sayyiduna Abu Bakr Siddiq (may Allah be pleased with him) stood up to deliver a sermon, and after praising Allah, he said: O people! You recite this verse «يَاأَيُّهَاالَّذِينَآمَنُواعَلَيْكُمْأَنفُسَكُمْلَايَضُرُّكُممَّنضَلَّإِذَااهْتَدَيْتُمْ»[5-المائدة:105] "O you who believe! Take care of your own selves. If you follow the right guidance, no one who goes astray can harm you." Remember! When people see a sinful act being committed and do not try to change it, soon Allah's punishment will encompass all of them. Remember! I heard the Prophet (peace and blessings be upon him) saying this in the same way.
Hadith Referenceمسند احمد / مسند الخلفاء الراشدين / 29