diff options
author | Lincoln Ramsay <lincoln.ramsay@nokia.com> | 2012-04-30 10:45:32 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-30 03:10:11 +0200 |
commit | 78eb8007edde7f9403e148b8d4a3a65e57155427 (patch) | |
tree | 8f47efd9fd9a98bd263d75f80b3099069405ba2a /src/sensors/gestures/simulatorgesturescommon.cpp | |
parent | c9b7a264a7f0be50ca0cfc66f342cd91093039c6 (diff) |
Don't crash when the emulator is missing.
The emulator may be missing (eg. when running unit/system tests) so
handle this case without crashing.
Also fix a missing QLatin1String() around a bare string.
Change-Id: Ibeeb0078c1ae12cec4bf8e3f4e81b3a4c72347da
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
Diffstat (limited to 'src/sensors/gestures/simulatorgesturescommon.cpp')
-rw-r--r-- | src/sensors/gestures/simulatorgesturescommon.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sensors/gestures/simulatorgesturescommon.cpp b/src/sensors/gestures/simulatorgesturescommon.cpp index 128db508..2578e459 100644 --- a/src/sensors/gestures/simulatorgesturescommon.cpp +++ b/src/sensors/gestures/simulatorgesturescommon.cpp @@ -90,6 +90,7 @@ void SensorGesturesConnection::newSensorGestureDetected() void SensorGesturesConnection::newSensorGestures(const QStringList &gestures) { + if (!mWorker) return; Q_FOREACH (const QString &gest, gestures) { if (!gest.contains(QLatin1String("detected"))) { QString tmp = gest.left(gest.length()-2); |