Having a child or having children does not automatically mean that the marriage will last and keep you together.
I know a few people who were happily married and then once they had kids their marriage got so bad that they divorced because of the kids.
So sometimes having kids can keep a marriage together while other times having kids can break up a marriage.
Some people want kids while other people don't want to have kids and that's okay.
Have kids if you really want the kids but don't have kids just because it may keep your marriage together.
A marriage should last with or without kids regardless especially if you both love each other truly.