aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compiler/glsl/glcpp/glcpp-parse.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/glsl/glcpp/glcpp-parse.y b/src/compiler/glsl/glcpp/glcpp-parse.y
index 2a8ea817a98..173e1a1586b 100644
--- a/src/compiler/glsl/glcpp/glcpp-parse.y
+++ b/src/compiler/glsl/glcpp/glcpp-parse.y
@@ -1187,6 +1187,9 @@ _token_list_equal_ignoring_space(token_list_t *a, token_list_t *b)
node_b = node_b->next;
}
+ if (node_a == NULL && node_b == NULL)
+ break;
+
if (node_b == NULL && node_a->token->type == SPACE) {
while (node_a && node_a->token->type == SPACE)
node_a = node_a->next;