mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Null check in CeContext::GetCustomAttribute
This commit is contained in:
parent
ebd341e311
commit
2388ae46ff
1 changed files with 1 additions and 1 deletions
|
@ -3921,7 +3921,7 @@ bool CeContext::GetCustomAttribute(BfModule* module, BfIRConstHolder* constHolde
|
||||||
if (!value)
|
if (!value)
|
||||||
Fail("Failed to encoded attribute");
|
Fail("Failed to encoded attribute");
|
||||||
auto attrConstant = module->mBfIRBuilder->GetConstant(value);
|
auto attrConstant = module->mBfIRBuilder->GetConstant(value);
|
||||||
if (!WriteConstant(module, resultAddr, attrConstant, customAttr->mType))
|
if ((attrConstant == NULL) || (!WriteConstant(module, resultAddr, attrConstant, customAttr->mType)))
|
||||||
Fail("Failed to decode attribute");
|
Fail("Failed to decode attribute");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue