Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: media/base/android/java/src/org/chromium/media/VideoCaptureAndroid.java

Issue 667433003: Fix a crash when cameraInfo is NULL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/java/src/org/chromium/media/VideoCaptureAndroid.java
diff --git a/media/base/android/java/src/org/chromium/media/VideoCaptureAndroid.java b/media/base/android/java/src/org/chromium/media/VideoCaptureAndroid.java
index 3fa63fedec2e83e290c5aa65b1759938105649a1..0a412e467f084cb1f20c1a0535a3d43350553fec 100644
--- a/media/base/android/java/src/org/chromium/media/VideoCaptureAndroid.java
+++ b/media/base/android/java/src/org/chromium/media/VideoCaptureAndroid.java
@@ -85,6 +85,7 @@ public class VideoCaptureAndroid extends VideoCapture {
static String getName(int id) {
android.hardware.Camera.CameraInfo cameraInfo = VideoCapture.getCameraInfo(id);
+ if (cameraInfo == null) return null;
return "camera " + id + ", facing " + (cameraInfo.facing ==
android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT ? "front" : "back");
}
« no previous file with comments | « no previous file | media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698