From: Chad Versace Date: Wed, 16 Jan 2013 01:29:21 +0000 (-0800) Subject: glsl/ir_factory: Initialize members to NULL in constructor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fafcbf52b7a45494e11488eb37d1e0b036ac8e4b;p=mesa.git glsl/ir_factory: Initialize members to NULL in constructor This eliminates unexpected behavior due to unitialized values. Reviewed-by: Ian Romanick Signed-off-by: Chad Versace --- diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h index 067858df45b..278294fe963 100644 --- a/src/glsl/ir_builder.h +++ b/src/glsl/ir_builder.h @@ -73,6 +73,13 @@ public: class ir_factory { public: + ir_factory() + : instructions(NULL), + mem_ctx(NULL) + { + return; + } + void emit(ir_instruction *ir); ir_variable *make_temp(const glsl_type *type, const char *name);