mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +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
@@ -21,6 +21,9 @@ GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE] = {};
|
||||
std::unique_ptr<GfxCoreHelper> GfxCoreHelper::create(const GFXCORE_FAMILY gfxCoreFamily) {
|
||||
|
||||
auto createFunction = gfxCoreHelperFactory[gfxCoreFamily];
|
||||
if (createFunction == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
auto gfxCoreHelper = createFunction();
|
||||
return gfxCoreHelper;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user