avm2: Fix crash when `Coerce`/`AsType` used a lazy multiname

This commit is contained in:
Lord-McSweeney 2024-01-08 18:26:43 -08:00 committed by Lord-McSweeney
parent dd82126448
commit dd35e4862f
1 changed files with 9 additions and 0 deletions

View File

@ -490,6 +490,15 @@ fn verify_code_starting_from<'gc>(
.pool_maybe_uninitialized_multiname(*name_index, &mut activation.context)
.unwrap();
if multiname.has_lazy_component() {
// This matches FP's error message
return Err(Error::AvmError(verify_error(
activation,
"Error #1014: Class [] could not be found.",
1014,
)?));
}
activation
.domain()
.get_class(&multiname, activation.context.gc_context)