It's spelled the same way as the place where trials are held, but it has a different meaning in this context. "To catch a cold" is a common idiom, and "court" in this sense means to be susceptible to or attract something, often something negative.
For example:
* "She's been courting a cold all week."
* "Sitting in the cold draft is just courting disaster."