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

Unified Diff: webrtc/api/java/android/org/webrtc/EglBase14.java

Issue 1855953002: Andoid EglBase: Detect failure to find EGL config (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Switch to more fine grained exceptions Created 4 years, 8 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 | « webrtc/api/java/android/org/webrtc/EglBase10.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/java/android/org/webrtc/EglBase14.java
diff --git a/webrtc/api/java/android/org/webrtc/EglBase14.java b/webrtc/api/java/android/org/webrtc/EglBase14.java
index 6ac61d062ca9baa36599197cb7d0d520cff8756c..4329c36e75254e046ad48385931aad0ccb642acb 100644
--- a/webrtc/api/java/android/org/webrtc/EglBase14.java
+++ b/webrtc/api/java/android/org/webrtc/EglBase14.java
@@ -228,9 +228,16 @@ public final class EglBase14 extends EglBase {
int[] numConfigs = new int[1];
if (!EGL14.eglChooseConfig(
eglDisplay, configAttributes, 0, configs, 0, configs.length, numConfigs, 0)) {
+ throw new RuntimeException("eglChooseConfig failed");
+ }
+ if (numConfigs[0] <= 0) {
throw new RuntimeException("Unable to find any matching EGL config");
}
- return configs[0];
+ final EGLConfig eglConfig = configs[0];
+ if (eglConfig == null) {
+ throw new RuntimeException("eglChooseConfig returned null");
+ }
+ return eglConfig;
}
// Return an EGLConfig, or die trying.
« no previous file with comments | « webrtc/api/java/android/org/webrtc/EglBase10.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698