Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > cf3451d6b816766353105160f3c6b8ab > files > 25

kdelibs4-4.6.5-1.5.mga1.src.rpm

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;