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

Unified Diff: webrtc/sdk/android/api/org/webrtc/CameraCapturer.java

Issue 2621633002: Add a check for CameraCapturer being initialized before calling startCapture. (Closed)
Patch Set: Created 3 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/android/api/org/webrtc/CameraCapturer.java
diff --git a/webrtc/sdk/android/api/org/webrtc/CameraCapturer.java b/webrtc/sdk/android/api/org/webrtc/CameraCapturer.java
index 86f5f217c1cd3dd19a8ada9bfea469e0c62d06de..fcfcd70e861e759b109477a1cd1c2eee73f0732a 100644
--- a/webrtc/sdk/android/api/org/webrtc/CameraCapturer.java
+++ b/webrtc/sdk/android/api/org/webrtc/CameraCapturer.java
@@ -13,7 +13,6 @@ package org.webrtc;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
-
import java.util.Arrays;
@SuppressWarnings("deprecation")
@@ -258,6 +257,9 @@ public abstract class CameraCapturer implements CameraVideoCapturer {
@Override
public void startCapture(int width, int height, int framerate) {
Logging.d(TAG, "startCapture: " + width + "x" + height + "@" + framerate);
+ if (applicationContext == null) {
+ throw new RuntimeException("CameraCapturer must be initialized before calling startCapture.");
+ }
synchronized (stateLock) {
if (sessionOpening || currentSession != null) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698