mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Add pointer checks
Change-Id: I37a6898670a4d9e66f0eff404b5282714f293956 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
04b4198228
commit
0270ad8015
@@ -25,8 +25,12 @@ PrintfHandler::~PrintfHandler() {
|
||||
}
|
||||
|
||||
PrintfHandler *PrintfHandler::create(const MultiDispatchInfo &multiDispatchInfo, Device &device) {
|
||||
if (multiDispatchInfo.usesStatelessPrintfSurface() ||
|
||||
(multiDispatchInfo.peekMainKernel()->checkIfIsParentKernelAndBlocksUsesPrintf())) {
|
||||
if (multiDispatchInfo.usesStatelessPrintfSurface()) {
|
||||
return new PrintfHandler(device);
|
||||
}
|
||||
auto mainKernel = multiDispatchInfo.peekMainKernel();
|
||||
if ((mainKernel != nullptr) &&
|
||||
mainKernel->checkIfIsParentKernelAndBlocksUsesPrintf()) {
|
||||
return new PrintfHandler(device);
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user