mate-users-admin: fix possible segfault on exit

Fixes segfault on app exit in some situations (e.g. after you change your password).

Imported from [this gnome-system-tools fix](https://code.launchpad.net/~thad-fisch/ubuntu/trusty/gnome-system-tools/fix-1185396/+merge/210009) (the code in question is identical in both mate-system-tools and gnome-system-tools).