intel: Check for a NULL src buffer prior to blt
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 5 Aug 2010 07:37:31 +0000 (08:37 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 5 Aug 2010 07:39:15 +0000 (08:39 +0100)
This can only happen along a malloc failure path, but check anyway.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/mesa/drivers/dri/intel/intel_tex_copy.c

index 224b506c05b17e77862b50b8472095e9b4cb5729..6efb2ddc553e21acfaa26462920c2ebf9c89c1a0 100644 (file)
@@ -102,7 +102,7 @@ do_copy_texsubimage(struct intel_context *intel,
    GLcontext *ctx = &intel->ctx;
    const struct intel_region *src = get_teximage_source(intel, internalFormat);
 
-   if (!intelImage->mt || !src) {
+   if (!intelImage->mt || !src || !src->buffer) {
       if (INTEL_DEBUG & DEBUG_FALLBACKS)
         fprintf(stderr, "%s fail %p %p (0x%08x)\n",
                 __FUNCTION__, intelImage->mt, src, internalFormat);