Signed-off-by: peng.chen <peng.c.c...@intel.com>
---
 src/i965_drv_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index bf59374..ded3d93 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -1210,7 +1210,7 @@ VAStatus i965_QueryConfigAttributes(VADriverContextP ctx,
 void
 i965_destroy_surface_storage(struct object_surface *obj_surface)
 {
-    if (!obj_surface)
+    if (!obj_surface || !obj_surface->bo)
         return;
 
     dri_bo_unreference(obj_surface->bo);
-- 
1.9.1

_______________________________________________
Libva mailing list
Libva@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libva

Reply via email to