summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensors/winrt/winrtgyroscope.cpp
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2014-06-17 14:29:19 +0200
committerJani Heikkinen <jani.heikkinen@digia.com>2014-06-18 09:36:50 +0200
commitfacae1ad357a80859da51f52f49db8c53d2e89be (patch)
treee47cd9cec48965f5b702825ab9ec718002984b8b /src/plugins/sensors/winrt/winrtgyroscope.cpp
parent87b569ccc4df161e33d41f7a5f1f25eced6f65c3 (diff)
WinRT: Check whether default sensors were obtained successfullyv5.3.1
In case of an unsuccessful call of the GetDefault function the returned HRESULT does not have the FAILED status but the returned sensor is 0. Task-number: QTBUG-39698 Change-Id: I42a8327c1d7687ab7a8ca71be5a2234b2c4e0b38 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Diffstat (limited to 'src/plugins/sensors/winrt/winrtgyroscope.cpp')
-rw-r--r--src/plugins/sensors/winrt/winrtgyroscope.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/sensors/winrt/winrtgyroscope.cpp b/src/plugins/sensors/winrt/winrtgyroscope.cpp
index dec65123..1e729a16 100644
--- a/src/plugins/sensors/winrt/winrtgyroscope.cpp
+++ b/src/plugins/sensors/winrt/winrtgyroscope.cpp
@@ -127,7 +127,7 @@ WinRtGyroscope::WinRtGyroscope(QSensor *sensor)
}
hr = factory->GetDefault(&d->sensor);
- if (FAILED(hr)) {
+ if (FAILED(hr) || !d->sensor) {
qCWarning(lcWinRtSensors) << "Unable to get default gyroscope sensor."
<< qt_error_string(hr);
sensorError(hr);