Fix NPE in VideoCaptureCamera.isZoomSupported()
Based on crash reports it appears possible for open() to return null without throwing an exception. getCameraParameters() handles this case gracefully by returning null but isZoomSupported() will then try to call release() on the null Camera. The release() call is unecessary because getCameraParameters() already releases the Camera on error. Bug: 1149283 Change-Id: I1a5522fa3179f3b6389e5dff83a0ca379f9f44ac Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2542785 Commit-Queue: Reilly Grant <reillyg@chromium.org> Commit-Queue: Min Qin <qinmin@chromium.org> Auto-Submit: Reilly Grant <reillyg@chromium.org> Reviewed-by:Min Qin <qinmin@chromium.org> Cr-Commit-Position: refs/heads/master@{#828012}
Showing
Please register or sign in to comment