Drawable and readable need to either both be None or both be non-None.
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
return True;
}
+ /* can't have only one be 0 */
+ if (!!draw != !!read) {
+ __glXUnlock();
+ __glXSendError(dpy, BadMatch, None, X_GLXMakeContextCurrent, True);
+ return False;
+ }
+
if (oldGC != &dummyContext) {
if (--oldGC->thread_refcount == 0) {
oldGC->vtable->unbind(oldGC, gc);