Adjust error handling in the clAddCommentINTEL

Related-To: NEO-3047

Change-Id: Ic9ecfff8358c43a37a1c4ea4ccf4aec8d09acde8
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
Jobczyk, Lukasz
2019-04-04 17:13:50 +02:00
parent 37bcc99cd2
commit e926a6d037
2 changed files with 8 additions and 8 deletions

View File

@ -4237,11 +4237,11 @@ cl_int CL_API_CALL clAddCommentINTEL(const char *comment) {
auto executionEnvironment = platform()->peekExecutionEnvironment();
auto aubCenter = executionEnvironment->aubCenter.get();
if (!comment || !aubCenter || !aubCenter->getAubManager()) {
if (!comment || (aubCenter && !aubCenter->getAubManager())) {
retVal = CL_INVALID_VALUE;
}
if (retVal == CL_SUCCESS) {
if (retVal == CL_SUCCESS && aubCenter) {
aubCenter->getAubManager()->addComment(comment);
}
return retVal;