summaryrefslogtreecommitdiffstats
path: root/libs/ui/Camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ui/Camera.cpp')
-rw-r--r--libs/ui/Camera.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/ui/Camera.cpp b/libs/ui/Camera.cpp
index 6c60b85..b3cbda1 100644
--- a/libs/ui/Camera.cpp
+++ b/libs/ui/Camera.cpp
@@ -110,6 +110,8 @@ sp<Camera> Camera::connect()
if (c->mCamera != 0) {
c->mCamera->asBinder()->linkToDeath(c);
c->mStatus = NO_ERROR;
+ } else {
+ c.clear();
}
return c;
}