| Index: webrtc/api/java/android/org/webrtc/EglBase10.java
|
| diff --git a/webrtc/api/java/android/org/webrtc/EglBase10.java b/webrtc/api/java/android/org/webrtc/EglBase10.java
|
| index fe2b73ee1cc2a542fbe8d5da6188d6609f7996ba..70f9eb73a65ff871574d9d72aa90567a0a0d1573 100644
|
| --- a/webrtc/api/java/android/org/webrtc/EglBase10.java
|
| +++ b/webrtc/api/java/android/org/webrtc/EglBase10.java
|
| @@ -268,9 +268,16 @@ final class EglBase10 extends EglBase {
|
| int[] numConfigs = new int[1];
|
| if (!egl.eglChooseConfig(
|
| eglDisplay, configAttributes, configs, configs.length, numConfigs)) {
|
| + 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.
|
|
|