Mishkat al-Masabih 152
‘Abdallah b. ‘Amr said:
Once when I went at midday to visit God’s messenger he heard the voices of two men in disagreement about a verse coming out to us with obvious signs of anger on his face, he said, “It was just because of their disagreement about God’s Book that your predecessors perished.” 

Muslim transmitted it.
وَعَن عبد الله بن عَمْرو قَالَ: هَجَّرْتُ إِلَى رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَوْمًا قَالَ: فَسَمِعَ أَصْوَاتَ رَجُلَيْنِ اخْتَلَفَا فِي آيَةٍ فَخَرَجَ عَلَيْنَا رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يُعْرَفُ فِي وَجْهِهِ الْغَضَبُ فَقَالَ: «إِنَّمَا هَلَكَ مَنْ كَانَ قَبْلَكُمْ باختلافهم فِي الْكتاب» . رَوَاهُ مُسلم