summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index eab35e7b8b6..81e862275d4 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -811,8 +811,7 @@ _mesa_alloc_dispatch_table(int size)
* Mesa we do this to accomodate different versions of libGL and various
* DRI drivers.
*/
- GLint numEntries = MAX2(_glapi_get_dispatch_table_size(),
- size / sizeof(_glapi_proc));
+ GLint numEntries = MAX2(_glapi_get_dispatch_table_size(), size);
struct _glapi_table *table =
(struct _glapi_table *) malloc(numEntries * sizeof(_glapi_proc));
if (table) {