diff options
Diffstat (limited to 'src/glx/dri_glx.c')
-rw-r--r-- | src/glx/dri_glx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c index 666423a7b15..9365224a696 100644 --- a/src/glx/dri_glx.c +++ b/src/glx/dri_glx.c @@ -587,6 +587,13 @@ dri_create_context(struct glx_screen *base, return NULL; if (shareList) { + /* If the shareList context is not a DRI context, we cannot possibly + * create a DRI context that shares it. + */ + if (shareList->vtable->destroy != dri_destroy_context) { + return NULL; + } + pcp_shared = (struct dri_context *) shareList; shared = pcp_shared->driContext; } |