diff options
Diffstat (limited to 'src/xvmc/surface.c')
-rw-r--r-- | src/xvmc/surface.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/xvmc/surface.c b/src/xvmc/surface.c index 67c179e66d..7c5f45bd34 100644 --- a/src/xvmc/surface.c +++ b/src/xvmc/surface.c @@ -73,14 +73,13 @@ Status XvMCCreateSurface(Display *display, XvMCContext *context, XvMCSurface *su assert(display == vlGetNativeDisplay(vlGetDisplay(vlContextGetScreen(vl_ctx)))); - vlCreateSurface - ( - vlContextGetScreen(vl_ctx), - context->width, - context->height, - vlGetPictureFormat(vl_ctx), - &vl_sfc - ); + if (vlCreateSurface(vlContextGetScreen(vl_ctx), + context->width, context->height, + vlGetPictureFormat(vl_ctx), + &vl_sfc)) + { + return BadAlloc; + } vlBindToContext(vl_sfc, vl_ctx); |