projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f3c737
)
glsl: Add an assert when cloning ir_dereference_record with invalid field
author
Danylo Piliaiev
<danylo.piliaiev@gmail.com>
Wed, 15 Aug 2018 12:46:23 +0000
(15:46 +0300)
committer
Timothy Arceri
<tarceri@itsqueeze.com>
Wed, 19 Sep 2018 22:30:11 +0000
(08:30 +1000)
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/ir_clone.cpp
patch
|
blob
|
history
diff --git
a/src/compiler/glsl/ir_clone.cpp
b/src/compiler/glsl/ir_clone.cpp
index 69441fae7de0e5eff396de2a94f110f6f65161de..e1f4f3b2903dd30697a44afb6301abbe956f9b14 100644
(file)
--- a/
src/compiler/glsl/ir_clone.cpp
+++ b/
src/compiler/glsl/ir_clone.cpp
@@
-194,6
+194,7
@@
ir_dereference_array::clone(void *mem_ctx, struct hash_table *ht) const
ir_dereference_record *
ir_dereference_record::clone(void *mem_ctx, struct hash_table *ht) const
{
+ assert(this->field_idx >= 0);
const char *field_name =
this->record->type->fields.structure[this->field_idx].name;
return new(mem_ctx) ir_dereference_record(this->record->clone(mem_ctx, ht),