Index: talk/app/webrtc/java/android/org/webrtc/EglBase10.java |
diff --git a/talk/app/webrtc/java/android/org/webrtc/EglBase10.java b/talk/app/webrtc/java/android/org/webrtc/EglBase10.java |
index f2aa9857faf09e223f40c610ab816d3f8969f84c..d11292d58e1f8ca28ff9074da3f99f1005176753 100644 |
--- a/talk/app/webrtc/java/android/org/webrtc/EglBase10.java |
+++ b/talk/app/webrtc/java/android/org/webrtc/EglBase10.java |
@@ -286,6 +286,9 @@ final class EglBase10 extends EglBase { |
// Return an EGLConfig, or die trying. |
private EGLContext createEglContext( |
Context sharedContext, EGLDisplay eglDisplay, EGLConfig eglConfig) { |
+ if (sharedContext != null && sharedContext.eglContext == EGL10.EGL_NO_CONTEXT) { |
+ throw new RuntimeException("Invalid sharedContext"); |
+ } |
int[] contextAttributes = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE}; |
EGLContext rootContext = |
sharedContext == null ? EGL10.EGL_NO_CONTEXT : sharedContext.eglContext; |