diff options
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/dri3_glx.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 6729357bb3c..90d7bba1e69 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -127,13 +127,9 @@ static __DRIcontext * glx_dri3_get_dri_context(struct loader_dri3_drawable *draw) { struct glx_context *gc = __glXGetCurrentContext(); + struct dri3_context *dri3Ctx = (struct dri3_context *) gc; - if (gc) { - struct dri3_context *dri3Ctx = (struct dri3_context *) gc; - return dri3Ctx->driContext; - } - - return NULL; + return (gc != &dummyContext) ? dri3Ctx->driContext : NULL; } static void |