When some SensorClients are destroyed, eg. when KSysguard is closed, they fail to deregister themselves from SensorAgent. This may cause a crash when further messages arrive for them. This patch fixes that.
Note: this is an old patch from phabricator https://phabricator.kde.org/D29616 with changes requested there. But unfortunately wasn't applied