glx: Fix potential crashes in glXWait{GL,X}

glxc->drawPriv will be NULL if the context is direct, or if it is
current but without a bound drawable. Mesa's libGL won't normally emit
protocol for direct contexts for these calls, but a malign client could
still crash the server.
3 jobs for glxwait-crash-fix in 6 minutes (queued for 17 seconds)
Status Job ID Name Coverage
  Docker Image
passed #298153
debian-testing

00:00:32

 
  Build And Test
passed #298154
autotools-build-and-test

00:05:27

passed #298155
meson-build-and-test

00:01:31