summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/vdpau.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/vdpau.c b/src/mesa/main/vdpau.c
index d9745939391..f1b3eceee31 100644
--- a/src/mesa/main/vdpau.c
+++ b/src/mesa/main/vdpau.c
@@ -132,6 +132,11 @@ register_surface(struct gl_context *ctx, GLboolean isOutput,
}
surf = CALLOC_STRUCT( vdp_surface );
+ if (surf == NULL) {
+ _mesa_error_no_memory("VDPAURegisterSurfaceNV");
+ return (GLintptr)NULL;
+ }
+
surf->vdpSurface = vdpSurface;
surf->target = target;
surf->access = GL_READ_WRITE;