From 1a814217c336529b6f3133f9491ff5920ecaf346 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Tue, 10 Jul 2012 11:07:54 -0700 Subject: [PATCH] mesa unpack: call _mesa_problem when unpack function is not available Signed-off-by: Jordan Justen Reviewed-by: Brian Paul --- src/mesa/main/format_unpack.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index 529c416a8cc..bd218520f77 100644 --- a/src/mesa/main/format_unpack.c +++ b/src/mesa/main/format_unpack.c @@ -1604,6 +1604,11 @@ get_unpack_rgba_function(gl_format format) initialized = GL_TRUE; } + if (table[format] == NULL) { + _mesa_problem(NULL, "unsupported unpack for format %s", + _mesa_get_format_name(format)); + } + return table[format]; } -- 2.30.2