i965_dri_video: don't try to render an invalid surface
authorXiang, Haihao <haihao.xiang@intel.com>
Thu, 24 Feb 2011 07:22:46 +0000 (15:22 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Thu, 24 Feb 2011 07:22:46 +0000 (15:22 +0800)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
i965_drv_video/i965_drv_video.c

index 5baa0ff..0f09d8a 100644 (file)
@@ -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);