Pontiac sunbird stalls in gear but idles just fine?

Mine did this and I found out it was the timing belt that needed to be changed.