From 2ce8c3553b5f7b97b110ff7d968411027c156552 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 19 Sep 2011 11:38:02 -0600 Subject: [PATCH] mesa: fix format/type check in unpack_image() for bitmaps Passing type == GL_BITMAP returns 0 while error values return -1. This fixes glPolygonStipple being compiled into display lists. --- src/mesa/main/dlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 2b2ff9015cb..e8f8fe2ae65 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -887,7 +887,7 @@ unpack_image(struct gl_context *ctx, GLuint dimensions, return NULL; } - if (_mesa_bytes_per_pixel(format, type) <= 0) { + if (_mesa_bytes_per_pixel(format, type) < 0) { /* bad format and/or type */ return NULL; } -- 2.11.0