summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2011-02-24 15:22:46 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2011-02-24 15:22:46 +0800
commit3739a5e19700f508eac0b874856d08a06ea9ff45 (patch)
tree9fa1e52bba3356f9db6736f122bdd1e9d810795f
parent2b7850b35a51c59a6692781d5e40e4bb608b6344 (diff)
downloadlibva-3739a5e19700f508eac0b874856d08a06ea9ff45.tar.gz
i965_dri_video: don't try to render an invalid surface
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r--i965_drv_video/i965_drv_video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index 5baa0ff..0f09d8a 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.c
@@ -1736,7 +1736,7 @@ i965_PutSurface(VADriverContextP ctx,
* will get here
*/
obj_surface = SURFACE(surface);
- if (obj_surface->bo == NULL)
+ if (!obj_surface || !obj_surface->bo)
return VA_STATUS_SUCCESS;
dri_drawable = dri_get_drawable(ctx, (Drawable)draw);