mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 02:18:05 +08:00
Add extra check for nullptr function pointer
Related-To: NEO-6853 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b2c26dde65
commit
ac63175a0f
@@ -16,6 +16,9 @@ createClGfxCoreHelperFunctionType clGfxCoreHelperFactory[IGFX_MAX_CORE] = {};
|
||||
|
||||
std::unique_ptr<ClGfxCoreHelper> ClGfxCoreHelper::create(GFXCORE_FAMILY gfxCore) {
|
||||
auto createClGfxCoreHelperFunc = clGfxCoreHelperFactory[gfxCore];
|
||||
if (createClGfxCoreHelperFunc == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
auto clGfxCoreHelper = createClGfxCoreHelperFunc();
|
||||
return clGfxCoreHelper;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user