You must stay away from such situations to begin with, as this is how the Shaytan plays with you.
If you sincerely intend to marry a girl, you should first determine whether she is righteous and practicing muslima with good moral conduct or not. You must select a good mother for your children and a kind wife. If this is all set and ready, pray istikhara and go ahead with it. Usually, your heart’s girl is not like that at all.