dri3: Check for dummyContext to see if the glx_context is valid
authorStefan Dirsch <sndirsch@suse.de>
Mon, 25 Apr 2016 13:06:25 +0000 (15:06 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 27 Apr 2016 12:03:34 +0000 (13:03 +0100)
commit7d25ed70362ee9362aeeadb00f5a4e2bea690827
tree2e4601bfbdcc4d934f454a8ff607d3d819709578
parent4d9b518ad2a03232bf8162b05c6504d06c47eb91
dri3: Check for dummyContext to see if the glx_context is valid

According to the comments in src/glx/glxcurrent.c __glXGetCurrentContext()
always returns a valid pointer. If no context is made current, it will
contain dummyContext. Thus a test for NULL will always fail.

https://lists.freedesktop.org/archives/mesa-dev/2016-April/113962.html

Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
Reviewed-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/glx/dri3_glx.c