mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 09:58:05 +02:00
glsl: Initialize coordinate to NULL in ir_texture constructor.
I ran into this while trying to create a TXS query, which doesn't have a coordinate. Since it didn't get initialized to NULL, a bunch of visitors tried to access it and crashed. Most of the time, this won't be a problem, but it's just a good idea. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
d9a8cd76e5
commit
b656df990f
1 changed files with 2 additions and 1 deletions
|
|
@ -1341,7 +1341,8 @@ enum ir_texture_opcode {
|
|||
class ir_texture : public ir_rvalue {
|
||||
public:
|
||||
ir_texture(enum ir_texture_opcode op)
|
||||
: op(op), projector(NULL), shadow_comparitor(NULL), offset(NULL)
|
||||
: op(op), coordinate(NULL), projector(NULL), shadow_comparitor(NULL),
|
||||
offset(NULL)
|
||||
{
|
||||
this->ir_type = ir_type_texture;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue