The medical literature does not report problems with continuing to breastfeed a baby through pregnancy, nor after a new baby is born. This is known as tandem nursing and is practiced by thousands of women (or more) world wide.
Nevertheless, health professional sometimes raise concerns that the oxytocin released by breastfeeding could cause the uterus to contract and lead to miscarriage. As stated above, the medical literature does not support this theoretical concern for most women. Should a woman have a high risk pregnancy, it is prudent for her to stop nursing the first baby by the time she reaches 20 weeks of gestation.