[Mesa-dev] [PATCH 5/5] glx: add missing null check in dri2_bind_tex_image

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Mon Dec 16 06:04:18 PST 2013


Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
 src/glx/dri2_glx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 309c1e7..b72a859 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -990,6 +990,9 @@ dri2_bind_tex_image(Display * dpy,
    struct dri2_context *pcp = (struct dri2_context *) gc;
    __GLXDRIdrawable *base = GetGLXDRIDrawable(dpy, drawable);
    struct glx_display *dpyPriv = __glXInitialize(dpy);
+   if (dpyPriv == NULL)
+       return;
+
    struct dri2_drawable *pdraw = (struct dri2_drawable *) base;
    struct dri2_display *pdp =
       (struct dri2_display *) dpyPriv->dri2Display;
-- 
1.8.1.2



More information about the mesa-dev mailing list