From: Brian Paul Date: Fri, 20 Jun 2008 16:20:47 +0000 (-0600) Subject: egl: added null ptr checks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a87e717d0d302bc376eff29d17d35f1314ff1a57;p=mesa.git egl: added null ptr checks --- 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; }