Skip to content

Commit dd5631a

Browse files
authored
error on invalid getSupportedImageFormats arg (#336)
1 parent 51f1149 commit dd5631a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/CL/opencl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3648,8 +3648,8 @@ class Context
36483648
cl_mem_object_type type,
36493649
vector<ImageFormat>* formats) const
36503650
{
3651-
if (!formats) {
3652-
return CL_SUCCESS;
3651+
if( formats == nullptr ) {
3652+
return detail::errHandler(CL_INVALID_ARG_VALUE, __GET_SUPPORTED_IMAGE_FORMATS_ERR);
36533653
}
36543654
return getSupportedImageFormats(flags, type, *formats);
36553655
}

0 commit comments

Comments
 (0)