summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-06-20 10:20:47 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-06-20 10:20:47 -0600
commita87e717d0d302bc376eff29d17d35f1314ff1a57 (patch)
tree281af5e5e985de49cc6f582006b9febb09997691 /src/gallium/winsys
parentfbd6e86b8f3c9bdeae7581d8d852b4df66e4b42c (diff)
egl: added null ptr checks
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/egl_xlib/egl_xlib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/winsys/egl_xlib/egl_xlib.c b/src/gallium/winsys/egl_xlib/egl_xlib.c
index 85fc83a4dc..eeb15e30a9 100644
--- a/src/gallium/winsys/egl_xlib/egl_xlib.c
+++ b/src/gallium/winsys/egl_xlib/egl_xlib.c
@@ -413,7 +413,10 @@ xlib_eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy,
(draw_surf ? draw_surf->Framebuffer : NULL),
(read_surf ? read_surf->Framebuffer : NULL));
- check_and_update_buffer_size(draw_surf);
+ if (draw_surf)
+ check_and_update_buffer_size(draw_surf);
+ if (read_surf && read_surf != draw_surf)
+ check_and_update_buffer_size(draw_surf);
return EGL_TRUE;
}