commit 71ac772ada5b3020b901c0dffbf5c4e1a49a2107 Author: Lukas Tinkl <lukas@kde.org> Date: Mon Jul 25 11:44:41 2011 +0200 tentative fix for a crash after waking up from sleep BUG: 270037 diff --git a/solid/solid/backends/upower/upowerbattery.cpp b/solid/solid/backends/upower/upowerbattery.cpp index 0f7b17c..ab555d4 100644 --- a/solid/solid/backends/upower/upowerbattery.cpp +++ b/solid/solid/backends/upower/upowerbattery.cpp @@ -112,6 +112,9 @@ Solid::Battery::ChargeState Battery::chargeState() const void Battery::slotChanged() { + if (!m_device) + return; + const bool old_isPlugged = m_isPlugged; const int old_chargePercent = m_chargePercent; const Solid::Battery::ChargeState old_chargeState = m_chargeState;