glx/dri3: handle NULL pointers in loader-to-DRI3 drawable conversion
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 27 Jan 2017 10:58:41 +0000 (11:58 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 6 Feb 2017 16:39:01 +0000 (17:39 +0100)
commit40c304fc065259c07c0f4f7a35efedd205e4f250
treee95850fc50ce23e28e55e32813035a5691724db6
parent02264bc6f9cb588bfa39f842c3f060356f3e32b7
glx/dri3: handle NULL pointers in loader-to-DRI3 drawable conversion

With a subsequent patch, we might see NULL loaderPrivates, e.g. when
a DRIdrawable is flushed whose corresponding GLXDRIdrawable was destroyed.
This resulted in a crash, since the loader vs. DRI3 drawable structures
have a non-zero offset.

Fixes glx-visuals-{depth,stencil} -pixmap

Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/glx/dri3_glx.c