From e0496b63ff0d41a36812b78e9062e92590fcdd55 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 9 Aug 2011 08:58:20 -0600 Subject: [PATCH] glx: move declarations before code --- src/glx/dri2_glx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 80e4da30beb..d9524d765bd 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -455,16 +455,20 @@ dri2_wait_gl(struct glx_context *gc) static void dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate) { + struct glx_display *priv; + struct dri2_display *pdp; + struct glx_context *gc; struct dri2_drawable *pdraw = loaderPrivate; + if (!pdraw) return; if (!pdraw->base.psc) return; - struct glx_display *priv = __glXInitialize(pdraw->base.psc->dpy); - struct dri2_display *pdp = (struct dri2_display *)priv->dri2Display; - struct glx_context *gc = __glXGetCurrentContext(); + priv = __glXInitialize(pdraw->base.psc->dpy); + pdp = (struct dri2_display *) priv->dri2Display; + gc = __glXGetCurrentContext(); /* Old servers don't send invalidate events */ if (!pdp->invalidateAvailable) -- 2.30.2