[Mesa-dev] [PATCH 11/12] glsl: check _mesa_hash_table_create return value in link_uniform_blocks
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Mon Apr 7 12:48:36 PDT 2014
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
src/glsl/link_uniform_blocks.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/glsl/link_uniform_blocks.cpp b/src/glsl/link_uniform_blocks.cpp
index 72d6c53..add3ef4 100644
--- a/src/glsl/link_uniform_blocks.cpp
+++ b/src/glsl/link_uniform_blocks.cpp
@@ -170,6 +170,11 @@ 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__);
+ return 0;
+ }
+
/* Determine which uniform blocks are active.
*/
link_uniform_block_active_visitor v(mem_ctx, block_hash, prog);
--
1.8.1.2
More information about the mesa-dev
mailing list