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