I'm going to be the unpopular person. To answer your question, I have no idea. I don't like to hypothesize on deep things like this purely because people are prone to say the "right thing" or whatever in public/on the internet, but the reality is most people do not know how they will react to things until they are actually in the situation. So many people say for example "Oh if I saw (insert injustice here) going on, I'd do this"... and in reality, most people just stand/sit gawking and do nothing.
I just want to add that people who are saying its illogical if you wished to ultimately end the relationship because the woman couldn't have kids aren't being realistic and living in the real world. The fact is that, however harsh, a lot of people, both male and female consider having a child/children a very important part of their overall life to 'feel complete' and having kids/not having kids has broken many relationships in various different forms.
Looking at OP's example, if the guy really loves the woman and is ok with an alternative like adoption etc, that's cool and some men could do that. However, there will be guys for example who are dead set on the idea of raising their own child/children with the mother, whose offspring share both their DNA, look like them etc, and any alternative which deviates from that like adoption won't make them happy and may be too much for them to settle on. I don't think that makes the person bad, its just a bad situation which unfortunately arose.