Mesa (master): egl: Fix deref before NULL-check
Kristian Høgsberg
krh at kemper.freedesktop.org
Thu Jul 29 03:55:25 UTC 2010
Module: Mesa
Branch: master
Commit: 2c343af09873f35cbc7b265d5606a228fe304bb9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c343af09873f35cbc7b265d5606a228fe304bb9
Author: Kristian Høgsberg <krh at bitplanet.net>
Date: Wed Jul 28 23:54:16 2010 -0400
egl: Fix deref before NULL-check
---
src/egl/main/eglcontext.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index 74a5a63..9fc5296 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -301,7 +301,7 @@ static EGLBoolean
_eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
{
_EGLThreadInfo *t = _eglGetCurrentThread();
- _EGLDisplay *dpy = ctx->Resource.Display;
+ _EGLDisplay *dpy;
EGLint conflict_api;
EGLBoolean surfaceless;
@@ -315,6 +315,7 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
return EGL_TRUE;
}
+ dpy = ctx->Resource.Display;
switch (_eglGetContextAPIBit(ctx)) {
case EGL_OPENGL_ES_BIT:
surfaceless = dpy->Extensions.KHR_surfaceless_gles1;
More information about the mesa-commit
mailing list