summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorStéphane Marchesin <[email protected]>2011-06-01 15:32:39 -0700
committerStéphane Marchesin <[email protected]>2011-06-06 12:35:58 -0700
commit3103c08ae91f6bcd42a223a5fe7f9d38746565c4 (patch)
treefa4a2a015a9697f1e11967a81abfedba598049b5 /src/gallium/drivers
parent1af8b7250f477cfb36cbd8d4885f0cfb9a2e9779 (diff)
i915g: don't destroy a texture buffer if it's NULL.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/i915/i915_resource_texture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c
index e05b059706d..b74b19d0fe4 100644
--- a/src/gallium/drivers/i915/i915_resource_texture.c
+++ b/src/gallium/drivers/i915/i915_resource_texture.c
@@ -700,7 +700,8 @@ i915_texture_destroy(struct pipe_screen *screen,
struct i915_winsys *iws = i915_screen(screen)->iws;
uint i;
- iws->buffer_destroy(iws, tex->buffer);
+ if (tex->buffer)
+ iws->buffer_destroy(iws, tex->buffer);
for (i = 0; i < Elements(tex->image_offset); i++)
if (tex->image_offset[i])