Skip to content

Commit de803d8

Browse files
committed
add null check for pipe_ptr
1 parent 491d948 commit de803d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/acl_kernel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ CL_API_ENTRY cl_int CL_API_CALL clSetKernelArgIntelFPGA(cl_kernel kernel,
442442
kernel->arg_defined[arg_index] = 1;
443443

444444
/* If this is a host pipe, create a host channel and bind them together */
445-
if (arg_info->host_accessible && pipe_ptr->host_pipe_info != NULL) {
445+
if (arg_info->host_accessible && pipe_ptr && pipe_ptr->host_pipe_info != NULL) {
446446
if (pipe_ptr->host_pipe_info->m_binded_kernel != NULL) {
447447
ERR_RET(CL_INVALID_ARG_VALUE, context,
448448
"This pipe has already been bound to a kernel. Cannot "

0 commit comments

Comments
 (0)