Mesa (master): intel: Check for a NULL src buffer prior to blt

Chris Wilson ickle at kemper.freedesktop.org
Thu Aug 5 07:39:56 UTC 2010


Module: Mesa
Branch: master
Commit: 66708fd8a98cc28dab756b9e29d026194ccdfcee
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=66708fd8a98cc28dab756b9e29d026194ccdfcee

Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Aug  5 08:37:31 2010 +0100

intel: Check for a NULL src buffer prior to blt

This can only happen along a malloc failure path, but check anyway.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

---

 src/mesa/drivers/dri/intel/intel_tex_copy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index 224b506..6efb2dd 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -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);




More information about the mesa-commit mailing list