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 6d894cd66ec85045c9789752f556e0bd16a69718..fa9453b0be391a57ff2b6d8a26f47a8c9927d975 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