An-Nisa' - 4:140

وَقَدْ نَزَّلَ عَلَيْكُمْ فِي الْكِتَابِ أَنْ إِذَا سَمِعْتُمْ آيَاتِ اللّهِ يُكَفَرُ بِهَا وَيُسْتَهْزَأُ بِهَا فَلاَ تَقْعُدُواْ مَعَهُمْ حَتَّى يَخُوضُواْ فِي حَدِيثٍ غَيْرِهِ إِنَّكُمْ إِذًا مِّثْلُهُمْ إِنَّ اللّهَ جَامِعُ الْمُنَافِقِينَ وَالْكَافِرِينَ فِي جَهَنَّمَ جَمِيعًا
[4:140]
And indeed He has revealed to you in the Book that when you hear Allah's communications disbelieved in and mocked at do not sit with them until they enter into some other discourse; surely then you would be like them; surely Allah will gather together the hypocrites and the unbelievers all in hell.
Already has He sent you Word in the Book, that when ye hear the signs of Allah held in defiance and ridicule, ye are not to sit with them unless they turn to a different theme: if ye did, ye would be like them. For Allah will collect the hypocrites and those who defy faith - all in Hell:-
He hath already revealed unto you in the Scripture that, when ye hear the revelations of Allah rejected and derided, (ye) sit not with them (who disbelieve and mock) until they engage in some other conversation. Lo! in that case (if ye stayed) ye would be like unto them. Lo! Allah will gather hypocrites and disbelievers, all together, into hell;