summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-05-08 17:11:05 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-05-08 17:11:05 -0600
commit29d9f6b0d263b6ea2f89ea955d53d2671d9a6e43 (patch)
treee1209f7a9dd46b2fdf48f951d73d5e8ce7503715
parente93243cb80ee3ae834a50efe7bacd232d8846305 (diff)
gallium: no-op st_Bitmap() if width or height is zero
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index f816e591042..56ca171a628 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -673,6 +673,9 @@ st_Bitmap(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
struct st_context *st = ctx->st;
struct pipe_texture *pt;
+ if (width == 0 || height == 0)
+ return;
+
st_validate_state(st);
if (!st->bitmap.vs) {