Genesis 38:10

10 What he did displeased the Lord, and the Lord killed him also.