diff options
-rw-r--r-- | src/mesa/glapi/glapi_getproc.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c index 95974fe3a0f..1badff81ea7 100644 --- a/src/mesa/glapi/glapi_getproc.c +++ b/src/mesa/glapi/glapi_getproc.c @@ -472,20 +472,21 @@ _glapi_add_dispatch( const char * const * function_names, } for ( i = 0 ; function_names[i] != NULL ; i++ ) { - if (! is_static[i] ) { + if (is_static[i]) { + continue; + } + + if (entry[i] == NULL) { + entry[i] = add_function_name( function_names[i] ); if (entry[i] == NULL) { - entry[i] = add_function_name( function_names[i] ); - if (entry[i] == NULL) { - /* FIXME: Possible memory leak here. - */ - return -1; - } + /* FIXME: Possible memory leak here. */ + return -1; } - - set_entry_info( entry[i], real_sig, offset ); } + + set_entry_info( entry[i], real_sig, offset ); } - + return offset; } |