UASSERT_OBJ

This commit is contained in:
Edmund Lam 2026-07-06 10:41:35 -04:00
parent 55de902d55
commit f0f240209f
1 changed files with 3 additions and 2 deletions

View File

@ -2266,8 +2266,9 @@ public:
}
} else if (const AstVarRef* const refp = VN_CAST(np, VarRef)) {
AstVar* const varp = refp->varp();
if (varp->varType() == VVarType::LPARAM && deferredVarps.count(varp)
&& reachedDeferred.insert(varp).second && varp->valuep()) {
if (varp && varp->varType() == VVarType::LPARAM && deferredVarps.count(varp)
&& reachedDeferred.insert(varp).second) {
UASSERT_OBJ(varp->valuep(), varp, "VarRef should have non-null valuep");
worklist.push_back(varp->valuep());
}
}