From 07556442a7f82d44cbd2e725efd475efcd8a437c Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 29 Oct 2014 14:16:39 -0700 Subject: [PATCH] nir/foreach_block: Return false if the callback on the last block fails Reviewed-by: Connor Abbott --- src/glsl/nir/nir.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index 25e71c74a3d..68c8b7516a1 100644 --- a/src/glsl/nir/nir.c +++ b/src/glsl/nir/nir.c @@ -1660,9 +1660,7 @@ nir_foreach_block(nir_function_impl *impl, nir_foreach_block_cb cb, void *state) return false; } - cb(impl->end_block, state); - - return true; + return cb(impl->end_block, state); } static bool -- 2.30.2