fix: avoid dereferencing nullptr
Related-To: NEO-11825 Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
parent
116c3ef771
commit
c80a5e0143
|
@ -423,11 +423,14 @@ int OfflineCompiler::queryAcronymIds(size_t numArgs, const std::vector<std::stri
|
|||
}
|
||||
}
|
||||
} else {
|
||||
auto hwInfoDepAcr = getHwInfoForDeprecatedAcronym(queryAcronym);
|
||||
if (nullptr != hwInfoDepAcr) {
|
||||
auto compilerProductHelper = NEO::CompilerProductHelper::create(hwInfoDepAcr->platform.eProductFamily);
|
||||
bool isMatched{false};
|
||||
if (auto hwInfoDepAcr = getHwInfoForDeprecatedAcronym(queryAcronym); hwInfoDepAcr) {
|
||||
if (auto compilerProductHelper = NEO::CompilerProductHelper::create(hwInfoDepAcr->platform.eProductFamily); compilerProductHelper) {
|
||||
matchedVersions.push_back(ProductConfigHelper::parseMajorMinorRevisionValue(compilerProductHelper->getDefaultHwIpVersion()));
|
||||
} else {
|
||||
isMatched = true;
|
||||
}
|
||||
}
|
||||
if (!isMatched) {
|
||||
helper->printf("Error: Invalid command line. Unknown acronym %s.\n", allArgs[2].c_str());
|
||||
retVal = OCLOC_INVALID_COMMAND_LINE;
|
||||
return retVal;
|
||||
|
|
Loading…
Reference in New Issue