OSDN Git Service

i965_dri_video: don't try to render an invalid surface
[android-x86/hardware-intel-common-libva.git] / 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);