base-client: fix potential uninitialized variable bug
contact-list: don't crash if 'd' is NULL

https://bugs.freedesktop.org/show_bug.cgi?id=79006