Subtitles: Avoid trying to draw empty text or background objects.

Otherwise it can result in QPainter error messages.

Thanks to faginbagin@ for identifying the root of the problem.
Refs #12056.