summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Xionghu <xionghu.luo@intel.com>2014-09-09 06:42:07 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-09-09 14:59:29 +0800
commit5fbb9810286541a841df1138ccaba099a29012a2 (patch)
tree4113ffcb29d8f0c0321011c3d6661998356efbe7
parentba21f080b15728bf4a742aa16aac5a341521ce33 (diff)
fix piglit cl-api-get-program-info fail.
add pointer check. Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r--src/cl_program.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cl_program.c b/src/cl_program.c
index c141a35a..a745c007 100644
--- a/src/cl_program.c
+++ b/src/cl_program.c
@@ -743,7 +743,7 @@ cl_program_get_kernel_names(cl_program p, size_t size, char *names, size_t *size
int i = 0;
const char *ker_name = NULL;
size_t len = 0;
- *size_ret = 0;
+ if(size_ret) *size_ret = 0;
if(p->ker == NULL) {
return;