widget: Don't clear stats of null pointers.

Fixes ticket:3981.