Sex while constipated

So I've been a bit constipated lately. Yesterday I had to use the bathroom but decided to wait because I was at my boyfriends house and don't like pooping at other peoples houses lol. Anyways, we had sex and my stomach hurt after! Do you think it hurt cause I was constipated?