summaryrefslogtreecommitdiff
path: root/src/glx/drisw_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/drisw_glx.c')
-rw-r--r--src/glx/drisw_glx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index afa335eee81..b45dd784524 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -587,6 +587,13 @@ drisw_create_context_attribs(struct glx_screen *base,
return NULL;
if (shareList) {
+ /* If the shareList context is not a DRISW context, we cannot possibly
+ * create a DRISW context that shares it.
+ */
+ if (shareList->vtable->destroy != drisw_destroy_context) {
+ return NULL;
+ }
+
pcp_shared = (struct drisw_context *) shareList;
shared = pcp_shared->driContext;
}