summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2015-04-02 18:33:15 +1000
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-04-02 08:44:55 +0000
commit9cf0b4ed7a8979d124ef0c222084816cca8c1f0a (patch)
tree4381236f0c66c542a063b5244f96bf2cb3530db2 /src/plugins
parent767f33d8c657f194d6d2e33f87ff9fc4560b30fe (diff)
Fix crash in QtSensors client, when sensorfwd is not running.
Change-Id: Iecb6fe8637001d3005aa04c58d1d888f534c5082 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp b/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp
index ba37628e..0ca815a5 100644
--- a/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp
@@ -294,7 +294,8 @@ bool SensorfwSensorBase::initSensorInterface(QString const &name)
void SensorfwSensorBase::standyOverrideChanged()
{
- m_sensorInterface->setStandbyOverride(sensor()->isAlwaysOn());
+ if (m_sensorInterface)
+ m_sensorInterface->setStandbyOverride(sensor()->isAlwaysOn());
}
bool SensorfwSensorBase::isFeatureSupported(QSensor::Feature feature) const