From 78eb8007edde7f9403e148b8d4a3a65e57155427 Mon Sep 17 00:00:00 2001 From: Lincoln Ramsay Date: Mon, 30 Apr 2012 10:45:32 +1000 Subject: 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 --- src/sensors/gestures/simulatorgesturescommon.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sensors/gestures/simulatorgesturescommon.cpp') 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); -- cgit v1.2.3