summaryrefslogtreecommitdiff
path: root/src/egl/main/eglcontext.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/eglcontext.c')
-rw-r--r--src/egl/main/eglcontext.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index 461679db09..5e24b02a58 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -109,17 +109,6 @@ _eglLookupContext(EGLContext ctx)
/**
- * Return the currently bound _EGLContext object, or NULL.
- */
-_EGLContext *
-_eglGetCurrentContext(void)
-{
- _EGLThreadInfo *t = _eglGetCurrentThread();
- return t->CurrentContext;
-}
-
-
-/**
* Just a placeholder/demo function. Real driver will never use this!
*/
EGLContext
@@ -219,6 +208,9 @@ _eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface d,
_EGLSurface *oldDrawSurface = _eglGetCurrentSurface(EGL_DRAW);
_EGLSurface *oldReadSurface = _eglGetCurrentSurface(EGL_READ);
+ if (_eglIsCurrentThreadDummy())
+ return _eglError(EGL_BAD_ALLOC, "eglMakeCurrent");
+
/* error checking */
if (ctx) {
if (draw == NULL || read == NULL) {