aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texstore.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-27 08:32:52 +0200
committermarha <marha@users.sourceforge.net>2011-10-27 08:32:52 +0200
commitd662d461634660f5c0f3998b5eb7d7ed3bd5a25f (patch)
treeacb25086e94250ff8edf746705bdffb5551c00d8 /mesalib/src/mesa/main/texstore.c
parent4f005bade376d15ee60e90ca45a831aff9725087 (diff)
downloadvcxsrv-d662d461634660f5c0f3998b5eb7d7ed3bd5a25f.tar.gz
vcxsrv-d662d461634660f5c0f3998b5eb7d7ed3bd5a25f.tar.bz2
vcxsrv-d662d461634660f5c0f3998b5eb7d7ed3bd5a25f.zip
mesa git update 27 okt 2011
Diffstat (limited to 'mesalib/src/mesa/main/texstore.c')
-rw-r--r--mesalib/src/mesa/main/texstore.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c
index cd9249630..05c1964d6 100644
--- a/mesalib/src/mesa/main/texstore.c
+++ b/mesalib/src/mesa/main/texstore.c
@@ -4499,6 +4499,9 @@ _mesa_store_teximage1d(struct gl_context *ctx, GLenum target, GLint level,
(void) border;
+ if (width == 0)
+ return;
+
/* allocate storage for texture data */
if (!ctx->Driver.AllocTextureImageBuffer(ctx, texImage, texImage->TexFormat,
width, 1, 1)) {
@@ -4560,6 +4563,9 @@ _mesa_store_teximage2d(struct gl_context *ctx, GLenum target, GLint level,
(void) border;
+ if (width == 0 || height == 0)
+ return;
+
/* allocate storage for texture data */
if (!ctx->Driver.AllocTextureImageBuffer(ctx, texImage, texImage->TexFormat,
width, height, 1)) {
@@ -4651,6 +4657,9 @@ _mesa_store_teximage3d(struct gl_context *ctx, GLenum target, GLint level,
(void) border;
+ if (width == 0 || height == 0 || depth == 0)
+ return;
+
/* allocate storage for texture data */
if (!ctx->Driver.AllocTextureImageBuffer(ctx, texImage, texImage->TexFormat,
width, height, depth)) {