summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/state_trackers/xvmc/surface.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/xvmc/surface.c b/src/gallium/state_trackers/xvmc/surface.c
index 2e67612f690..13f337c61cd 100644
--- a/src/gallium/state_trackers/xvmc/surface.c
+++ b/src/gallium/state_trackers/xvmc/surface.c
@@ -193,6 +193,10 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac
);
surface_priv->video_buffer = pipe->create_video_buffer(pipe, &tmpl);
+ if (!surface_priv->video_buffer) {
+ FREE(surface_priv);
+ return BadAlloc;
+ }
surface_priv->context = context;
surface->surface_id = XAllocID(dpy);