I think that was afterward. She hated him at first because she was a live, beautiful girl in his bed but Robert was obsessed with Ned Stark's dead sister—but she really hated him after the baby died. Which I think is just too bad, as wasn't really his fault, and he did have to take the baby away from her eventually.