[Mesa-dev] [PATCH] glx: Add missing null check in DRI2WireToEvent

Brian Paul brianp at vmware.com
Mon Dec 9 09:02:51 PST 2013


On 12/09/2013 06:15 AM, Juha-Pekka Heikkila wrote:
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> ---
>   src/glx/dri2.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/src/glx/dri2.c b/src/glx/dri2.c
> index bcd1f9c..deb50ab 100644
> --- a/src/glx/dri2.c
> +++ b/src/glx/dri2.c
> @@ -102,6 +102,8 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
>         __GLXDRIdrawable *pdraw;
>
>         pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, awire->drawable);
> +      if(pdraw == NULL)

I know the code's not consistent, but usually put a space in there:
'if (pdraw == NULL)'


> +         return False;
>
>         /* Ignore swap events if we're not looking for them */
>         aevent->type = dri2GetSwapEventType(dpy, awire->drawable);
>

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list