summaryrefslogtreecommitdiffstats
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 f6aeda90abb..801ac7d470b 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -383,6 +383,13 @@ drisw_create_context(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;
}