[Mesa-dev] [PATCH 2/2] mesa: Add extra null check in _mesa_GenerateMipmap()
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Fri Jan 10 04:57:11 PST 2014
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
src/mesa/main/fbobject.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 2892784..6b88e7d 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3024,6 +3024,12 @@ _mesa_GenerateMipmap(GLenum target)
texObj = _mesa_get_current_tex_object(ctx, target);
+ if (!texObj) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGenerateMipmap(current_tex_object=null)");
+ return;
+ }
+
if (texObj->BaseLevel >= texObj->MaxLevel) {
/* nothing to do */
return;
--
1.8.1.2
More information about the mesa-dev
mailing list