I did the right thing?

I’ve been talking to this guy for a while. He was the sweetest thing ever and treated me like there was no other girl for him so I never would’ve thought he’d be cheating on his girlfriend with me and I was just the side piece.

I found out he had a girlfriend and didn’t say anything to him then messaged her and asked if they were still together to make sure I wasn’t crazy or anything. She said yes and I explained to her that he had been cheating on her with me for a while now.

Is it good that I just went ahead and told her?

I feel really bad for messing up their relationship but I didn’t want her dating someone like that. She was such a sweet person. I didn’t know her though. I just don’t like making people upset.

I had no idea until today that he was in a long term relationship :(