summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camera/SensorListener.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/camera/SensorListener.cpp b/camera/SensorListener.cpp
index 86d597a..1974160 100644
--- a/camera/SensorListener.cpp
+++ b/camera/SensorListener.cpp
@@ -137,6 +137,11 @@ status_t SensorListener::initialize() {
LOG_FUNCTION_NAME;
mSensorEventQueue = mgr.createEventQueue();
+ if (mSensorEventQueue == NULL) {
+ CAMHAL_LOGEA("createEventQueue returned NULL");
+ ret = NO_INIT;
+ goto out;
+ }
sp<Looper> mLooper = new Looper(false);
mLooper->addFd(mSensorEventQueue->getFd(), 0, ALOOPER_EVENT_INPUT, sensor_events_listener, this);