From b1c5d74f270460c666307b011fbfc2822f1c3e02 Mon Sep 17 00:00:00 2001 From: Sir Anthony Date: Sat, 15 Mar 2014 17:01:26 +0600 Subject: [PATCH 1/1] glsl: Fix segfault on void rightmost sequence expression. --- src/glsl/ast_to_hir.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 8f6e901..9d4d780 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -1737,6 +1737,12 @@ ast_expression::hir(exec_list *instructions, result = ast->hir(instructions, state); } + if (result == NULL) { + _mesa_glsl_error(& loc, state, "rightmost sequence expression must " + "have non-void type"); + result = ir_rvalue::error_value(ctx); + } + /* Any errors should have already been emitted in the loop above. */ error_emitted = true; -- 1.8.3.2