Is it bad that I texted my ex?

My bf & I have been dating for about 6 months. My ex & I broke up earlier this year & we never really got any closure from it. During my current relationship I felt like I reached a dead end & didn’t know how to get out of it. Communication with my partner was difficult at the time & old thoughts started creeping back up. I impulsively texted my ex asking him a question I wanted an answer to since we broke up. I asked him if he ever felt the need to change for me. He responded & we politely ended the conversation. That was the end of it. My current boyfriend always used to say that my ex changed for me & that’s why we didn’t have many problems. I did tell my current boyfriend about this but he was very angry that I texted him. He wondered how he can be sure that I won’t do it again & that he feels insecure as to whether I really want him. Is it really that bad…?