summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--va/x11/va_x11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c
index 0d62534..947b5b1 100644
--- a/va/x11/va_x11.c
+++ b/va/x11/va_x11.c
@@ -63,7 +63,7 @@ static void va_DisplayContextDestroy (
ctx = pDisplayContext->pDriverContext;
dri_state = ctx->dri_state;
- if (dri_state)
+ if (dri_state && dri_state->close)
dri_state->close(ctx);
free(pDisplayContext->pDriverContext->dri_state);