diff options
author | Juha-Pekka Heikkila <[email protected]> | 2014-04-03 17:06:42 +0300 |
---|---|---|
committer | Ville Syrjälä <[email protected]> | 2014-06-26 15:37:14 +0300 |
commit | 088da3720f12579c14b1f0edd6e6df6ff8b74571 (patch) | |
tree | 3eb581ba4be73e37402d8ac7c635f569129d32eb /src/glsl/link_uniform_blocks.cpp | |
parent | db081b497e42556f9f6d771de104bea948c925b5 (diff) |
glsl: check _mesa_hash_table_create return value in link_uniform_blocks
Signed-off-by: Juha-Pekka Heikkila <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/link_uniform_blocks.cpp')
-rw-r--r-- | src/glsl/link_uniform_blocks.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/link_uniform_blocks.cpp b/src/glsl/link_uniform_blocks.cpp index 1a0e6431805..53a18c93464 100644 --- a/src/glsl/link_uniform_blocks.cpp +++ b/src/glsl/link_uniform_blocks.cpp @@ -170,6 +170,12 @@ link_uniform_blocks(void *mem_ctx, struct hash_table *block_hash = _mesa_hash_table_create(mem_ctx, _mesa_key_string_equal); + if (block_hash == NULL) { + _mesa_error_no_memory(__func__); + linker_error(prog, "out of memory\n"); + return 0; + } + /* Determine which uniform blocks are active. */ link_uniform_block_active_visitor v(mem_ctx, block_hash, prog); |