[Mesa-dev] [PATCH] dri2GetGlxDrawableFromXDrawableId may return NULL

Kristian Høgsberg krh at bitplanet.net
Thu Jul 29 13:22:01 PDT 2010


On Wed, Jul 28, 2010 at 3:46 AM, Niels Ole Salscheider
<niels_ole at salscheider-online.de> wrote:
> Hello,
>
> I have written a small patch that fixes a crash in KWin (see
> attachment).
>
> Since dri2GetGlxDrawableFromXDrawableId may return NULL we
> should only dereference the returned pointer if it is not NULL.

It shouldn't return NULL... when does this happen? During shutdown?
We only get the DRI2 events for drawables we've created a DRI2
drawable for, which means there should be a __GLXDRIdrawable in the
hash.  As for the bind_tex_image, does KWin create a glx drawable and
then use the X window XID for tfp?  These things shouldn't happen so I
don't just want to slap a NULL check on them without understanding how
it happens.

Kristian


More information about the mesa-dev mailing list