From 2542d8e0c2ec3eb4de266c0b2ad93dba918cb89c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 4 Aug 2010 12:50:36 -0400 Subject: [PATCH] glx: Move deref after NULL check --- src/glx/dri2_glx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 99384f8c371..ff48c79c272 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -657,9 +657,10 @@ dri2_bind_tex_image(Display * dpy, struct dri2_drawable *pdraw = (struct dri2_drawable *) base; struct dri2_display *pdp = (struct dri2_display *) dpyPriv->dri2Display; - struct dri2_screen *psc = (struct dri2_screen *) base->psc; + struct dri2_screen *psc; if (pdraw != NULL) { + psc = (struct dri2_screen *) base->psc; #if __DRI2_FLUSH_VERSION >= 3 if (!pdp->invalidateAvailable && psc->f) -- 2.30.2