diff options
Diffstat (limited to 'src/glx/dri3_glx.c')
-rw-r--r-- | src/glx/dri3_glx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index c2685cc693d..47a8e9a5686 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -268,6 +268,13 @@ dri3_create_context_attribs(struct glx_screen *base, goto error_exit; if (shareList) { + /* If the shareList context is not a DRI3 context, we cannot possibly + * create a DRI3 context that shares it. + */ + if (shareList->vtable->destroy != dri3_destroy_context) { + return NULL; + } + pcp_shared = (struct dri3_context *) shareList; shared = pcp_shared->driContext; } |