summaryrefslogtreecommitdiff
path: root/run.c
diff options
context:
space:
mode:
authorAlejandro Piñeiro <apinheiro@igalia.com>2019-04-26 17:53:16 +0200
committerAlejandro Piñeiro <apinheiro@igalia.com>2019-04-29 11:13:07 +0200
commit1a31939f303c91a6113a471656d5423018212bae (patch)
treec1969ed93f77a15d26b0f1fb075d41adcaf662f3 /run.c
parent20372b4da9441d88fb108e1abc02270bfff955a1 (diff)
run: set NULL as initial value for binding_list
Without it, under some specific compilation options, it can be initialized to NULL or to garbage. On the latter case, if the shader doesn't require a binding_list, would cause a crash later when it attempts to be used. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Diffstat (limited to 'run.c')
-rw-r--r--run.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/run.c b/run.c
index 64515bf..e311f89 100644
--- a/run.c
+++ b/run.c
@@ -840,7 +840,7 @@ main(int argc, char **argv)
enum shader_type type;
unsigned num_shaders;
bool use_separate_shader_objects;
- struct binding_list *binding;
+ struct binding_list *binding = NULL;
struct shader *shader = get_shaders(&core, &compat, &es,
text, shader_test[i].filesize,
&type, &num_shaders,