avoid crash in kactivities if no dbus connection is available
Differential Revision: https://phabricator.kde.org/D9703