Car and fumes

I was in the car for about 40 min and I wasn't driving I was just talking to my friend but he turned the car on and put the heat on also to warm up the car. Then he turned the car off but is it bad to inhale all the fumes from the car not moving? I'm just asking because I'm pregnant. Ps; The Windows was not open.