Fix possible empty warning bar.

See #673.
Merge pull request #677 from kabel/bugfix-673-3.1

Fix possible empty warning bar.