Trials and Fierce Battles (Kitab Al-Fitan Wa Al-Malahim)
Dawud :: Book 35 : Hadith 4240
Narrated AbuMalik al-Ash'ari:
The Prophet (peace_be_upon_him) said: Allah has protected you from three things: that your Prophet should not invoke a curse on you and should all perish, that those who follow what is false should not prevail over those who follow the truth, and that you should not all agree in an error.