Merge "Camera: Don\'t crash when the device has no vendor tags." into nyc-dev
am: b026bb1d9c

* commit 'b026bb1d9ca239af6f241a3c2c84130767a76564':
  Camera: Don't crash when the device has no vendor tags.
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 181c473..eacde99 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -660,8 +660,10 @@
         ALOGE("%s: camera hardware module doesn't exist", __FUNCTION__);
         return STATUS_ERROR(ERROR_DISCONNECTED, "Camera subsystem not available");
     }
-
-    *desc = *(VendorTagDescriptor::getGlobalVendorTagDescriptor().get());
+    sp<VendorTagDescriptor> globalDescriptor = VendorTagDescriptor::getGlobalVendorTagDescriptor();
+    if (globalDescriptor != nullptr) {
+        *desc = *(globalDescriptor.get());
+    }
     return Status::ok();
 }