From 198cd136b94b2ddfb8e2d50e567f3e391eb93915 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Sun, 16 Feb 2014 19:35:11 +0100 Subject: [PATCH] clover: Fix up NULL constant pointer arguments. Tested-by: Tom Stellard --- src/gallium/state_trackers/clover/core/kernel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp b/src/gallium/state_trackers/clover/core/kernel.cpp index 6d894cd66ec..fa9453b0be3 100644 --- a/src/gallium/state_trackers/clover/core/kernel.cpp +++ b/src/gallium/state_trackers/clover/core/kernel.cpp @@ -411,7 +411,8 @@ kernel::constant_argument::bind(exec_context &ctx, void kernel::constant_argument::unbind(exec_context &ctx) { - buf->resource(*ctx.q).unbind_surface(*ctx.q, st); + if (buf) + buf->resource(*ctx.q).unbind_surface(*ctx.q, st); } void -- 2.30.2