From: Brian Paul Date: Tue, 9 Aug 2011 14:58:20 +0000 (-0600) Subject: glx: move declarations before code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e0496b63ff0d41a36812b78e9062e92590fcdd55;p=mesa.git glx: move declarations before code --- 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)