Browse Source

egl: Fix deref before NULL-check

tags/mesa-7.9-rc1
Kristian Høgsberg 15 years ago
parent
commit
2c343af098
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/egl/main/eglcontext.c

+ 2
- 1
src/egl/main/eglcontext.c View File

@@ -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;

Loading…
Cancel
Save