From 35c522dce461a7d18a471e681413781da702d4b0 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 21 Mar 2013 19:29:29 +0100 Subject: radeonsi: fix crash while binding a NULL constant buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer --- src/gallium/drivers/radeonsi/si_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers/radeonsi/si_state.c') diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 7eac477327a..bdd41b45534 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2491,7 +2491,7 @@ static void si_set_constant_buffer(struct pipe_context *ctx, uint shader, uint i /* Note that the state tracker can unbind constant buffers by * passing NULL here. */ - if (cb == NULL) + if (cb == NULL || (!cb->buffer && !cb->user_buffer)) return; pm4 = CALLOC_STRUCT(si_pm4_state); -- cgit v1.2.3