Skip to content

Commit 30ec62f

Browse files
committed
fixed dereferency sampler variable
1 parent c4cf527 commit 30ec62f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/acl_kernel.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,10 @@ CL_API_ENTRY cl_int CL_API_CALL clSetKernelArgIntelFPGA(cl_kernel kernel,
642642
kernel->arg_is_ptr[arg_index] = CL_FALSE;
643643
} else if (is_sampler) {
644644
cl_sampler sampler = *(cl_sampler *)arg_value;
645+
if (sampler == 0) {
646+
ERR_RET(CL_INVALID_ARG_VALUE, context, "Sampler value is NULL");
647+
}
648+
645649
int sampler_bitfield = 0;
646650

647651
sampler_bitfield = 0;

0 commit comments

Comments
 (0)