Fix bug -refs BT#7749

This happened when a user didn't have a session list, then the array returned was null.