[cairo-commit] src/drm

Chris Wilson ickle at kemper.freedesktop.org
Wed Jan 27 15:29:05 PST 2010


 src/drm/cairo-drm-i915-spans.c  |    2 +-
 src/drm/cairo-drm-i965-glyphs.c |    2 +-
 src/drm/cairo-drm-i965-spans.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a38accb694452fc5dfac63535648656885cd47eb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jan 27 23:27:46 2010 +0000

    drm-intel: The accumulation bo may be NULL, beware.
    
    If we are not accumulating but rendering directly to the output vbo,
    then the tail bo may not even be allocated, let alone mapped.

diff --git a/src/drm/cairo-drm-i915-spans.c b/src/drm/cairo-drm-i915-spans.c
index b3db71f..e137149 100644
--- a/src/drm/cairo-drm-i915-spans.c
+++ b/src/drm/cairo-drm-i915-spans.c
@@ -612,7 +612,7 @@ i915_spans_fini (i915_spans_t *spans)
 {
     i915_shader_fini (&spans->shader);
 
-    if (spans->tail->bo->virtual)
+    if (spans->tail->bo && spans->tail->bo->virtual)
 	intel_bo_unmap (spans->tail->bo);
 
     if (spans->head.bo != NULL) {
diff --git a/src/drm/cairo-drm-i965-glyphs.c b/src/drm/cairo-drm-i965-glyphs.c
index e31bc9c..a5ccd4d 100644
--- a/src/drm/cairo-drm-i965-glyphs.c
+++ b/src/drm/cairo-drm-i965-glyphs.c
@@ -449,7 +449,7 @@ i965_surface_glyphs (void			*abstract_surface,
   CLEANUP_GLYPHS:
     i965_shader_fini (&glyphs.shader);
 
-    if (glyphs.tail->bo->virtual)
+    if (glyphs.tail->bo && glyphs.tail->bo->virtual)
 	intel_bo_unmap (glyphs.tail->bo);
 
     if (glyphs.head.bo != NULL) {
diff --git a/src/drm/cairo-drm-i965-spans.c b/src/drm/cairo-drm-i965-spans.c
index 581f1a7..3b2e2f7 100644
--- a/src/drm/cairo-drm-i965-spans.c
+++ b/src/drm/cairo-drm-i965-spans.c
@@ -344,7 +344,7 @@ i965_spans_fini (i965_spans_t *spans)
 {
     i965_shader_fini (&spans->shader);
 
-    if (spans->tail->bo->virtual)
+    if (spans->tail->bo && spans->tail->bo->virtual)
 	intel_bo_unmap (spans->tail->bo);
 
     if (spans->head.bo != NULL) {


More information about the cairo-commit mailing list