Guard against nullable battery objects on disconnect
There's a similar check in onDeviceAdded
above, but this check is
structured such that any possible leftovers will be removed in any case.
Note: this patch doesn't prevent Plasma from crashing in presence of a "glitched device", but it gets rid of two annoying errors in logs:
Sep 05 23:10:31 orange org_kde_powerdevil[50765]: QObject::disconnect: Unexpected nullptr parameter
Sep 05 23:10:31 orange org_kde_powerdevil[50765]: QObject::disconnect: Unexpected nullptr parameter