clover: Fix up NULL constant pointer arguments.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 16 Feb 2014 18:35:11 +0000 (19:35 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 21 Feb 2014 11:29:05 +0000 (12:29 +0100)
Tested-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/state_trackers/clover/core/kernel.cpp

index 6d894cd..fa9453b 100644 (file)
@@ -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