glx: fix error code when there is no context bound
v2: change all related NULL checks to check against dummyContext
v3: really check for dummyContext *only* when ctx was from
__glXGetCurrentContext
v4: cover more checks, add dummyBuffer, dummyVtable (Emil)
Signed-off-by: Bernard Kilarski <bernard.r.kilarski@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: "11.2" <mesa-stable@lists.freedesktop.org>