summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-03-15 16:06:58 -0600
committerBrian <[email protected]>2007-03-15 16:06:58 -0600
commit7ed292a4e946fe43b04dd76d5f26df4e70765788 (patch)
tree97dafec0b6f67b721753df1c66fb84899f95fc08
parent62b4601e53438096f362657bec2c4c238279509f (diff)
in _mesa_GetColorTable, return silently if table size is 0
-rw-r--r--src/mesa/main/colortab.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index 9fb0baf4a7c..2ad5c309b45 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.2
+ * Version: 6.5.3
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -722,6 +722,10 @@ _mesa_GetColorTable( GLenum target, GLenum format,
ASSERT(table);
+ if (table->Size <= 0) {
+ return;
+ }
+
switch (table->_BaseFormat) {
case GL_ALPHA:
{