[Mesa-dev] [PATCH] glx: Add missing null check in gxl/dri2_glx.c

Brian Paul brianp at vmware.com
Tue Dec 3 08:50:01 PST 2013


On 12/02/2013 07:30 AM, Juha-Pekka Heikkila wrote:
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> ---
>   src/glx/dri2_glx.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
> index 3b33312..bfeebed 100644
> --- a/src/glx/dri2_glx.c
> +++ b/src/glx/dri2_glx.c
> @@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
>      psc = (struct dri2_screen *) pdraw->base.psc;
>
>      priv = __glXInitialize(psc->base.dpy);
> +
> +   if (priv == NULL)
> +       return;
> +
>      pdp = (struct dri2_display *) priv->dri2Display;
>      gc = __glXGetCurrentContext();
>
>
Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list