From: Jordan Justen Date: Tue, 10 Jul 2012 18:07:54 +0000 (-0700) Subject: mesa unpack: call _mesa_problem when unpack function is not available X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a814217c336529b6f3133f9491ff5920ecaf346;p=mesa.git mesa unpack: call _mesa_problem when unpack function is not available Signed-off-by: Jordan Justen Reviewed-by: Brian Paul --- 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]; }