dri2: Check for dummyContext to see if the glx_context is valid
authorEgbert Eich <eich@suse.com>
Thu, 21 Apr 2016 13:02:53 +0000 (15:02 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 27 Apr 2016 12:03:11 +0000 (13:03 +0100)
commit4d9b518ad2a03232bf8162b05c6504d06c47eb91
tree7c3e6843ee4e1cb21e00874da2a364c043d9be5b
parent6d1a59d15b31a0d03b8e741784dfc8b433435ba8
dri2: 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://bugzilla.opensuse.org/show_bug.cgi?id=962609

Tested-by: Olaf Hering <ohering@suse.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/glx/dri2_glx.c