Viral meningitis is contagious, but even if you've been in contact with someone who has this it is unlikely to harm your baby, though it's always worth consulting your doctor, especially if the contact was very close. You might find this doctor's advice fits your situation to some extent.
I had viral meningitis at 20 weeks in my pregnancy. I was assured it would not impact my child and I have a healthy 5 year old now.