summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-06-20 10:20:47 -0600
committerBrian Paul <[email protected]>2008-06-20 10:20:47 -0600
commita87e717d0d302bc376eff29d17d35f1314ff1a57 (patch)
tree281af5e5e985de49cc6f582006b9febb09997691 /src/gallium
parentfbd6e86b8f3c9bdeae7581d8d852b4df66e4b42c (diff)
egl: added null ptr checks
Diffstat (limited to 'src/gallium')
-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 85fc83a4dc6..eeb15e30a92 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;
}