Skip to content

Guard against nullable battery objects on disconnect

ivan tkachenko requested to merge work/ratijas/stop-warnings into master

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

Merge request reports

Loading