diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_mipmap_tree.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_mipmap_tree.c b/src/mesa/drivers/dri/i915/intel_mipmap_tree.c index 1776a4b34c5..058cfbe1bcc 100644 --- a/src/mesa/drivers/dri/i915/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i915/intel_mipmap_tree.c @@ -260,6 +260,8 @@ intel_miptree_create_layout(struct intel_context *intel, GLuint num_samples) { struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1); + if (!mt) + return NULL; DBG("%s target %s format %s level %d..%d <-- %p\n", __FUNCTION__, _mesa_lookup_enum_by_nr(target), diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 1776a4b34c5..058cfbe1bcc 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -260,6 +260,8 @@ intel_miptree_create_layout(struct intel_context *intel, GLuint num_samples) { struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1); + if (!mt) + return NULL; DBG("%s target %s format %s level %d..%d <-- %p\n", __FUNCTION__, _mesa_lookup_enum_by_nr(target), |