As 1ke said, the issue is not that somebody had an addiction, it’s whether that addiction impaired the consent to the marriage.
Was the person who had the addiction able to freely consent to be married, or was their consent impaired because they were under the influence of some substance, or mentally unwell, or coerced because their addiction made them weak? If they didn’t freely consent, then the marriage may be invalid. However, just because a person has an addiction, doesn’t necessarily mean they can’t freely consent to be married.
Was the person who didn’t have the addiction/ mental condition aware that their fiance(e) had an addiction/ mental condition? Did the person with the addiction/ mental condition know s/he had it before the marriage, and hide that fact from the other person? When I married my husband, to my knowledge he had no addictions or mental conditions. If indeed he had one, and knew he had one, and hid it from me, then that could have made our marriage invalid because I would not have consented to marry someone who had that particular addiction or condition. (I had no interest in marrying an addict and in the recent past I had ended a serious long-term relationship with an alcoholic and my husband-to-be knew that.)
I hope this is making it more clear.