avm2: Don't except when dispatching events on unconstructed objects.
This commit is contained in:
parent
50546512fe
commit
a2d56016cb
|
@ -381,7 +381,14 @@ pub fn dispatch_event_to_target<'gc>(
|
||||||
&QName::new(Namespace::private(NS_EVENT_DISPATCHER), "dispatch_list"),
|
&QName::new(Namespace::private(NS_EVENT_DISPATCHER), "dispatch_list"),
|
||||||
activation,
|
activation,
|
||||||
)?
|
)?
|
||||||
.coerce_to_object(activation)?;
|
.coerce_to_object(activation);
|
||||||
|
|
||||||
|
if dispatch_list.is_err() {
|
||||||
|
// Objects with no dispatch list act as if they had an empty one
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
|
let dispatch_list = dispatch_list.unwrap();
|
||||||
|
|
||||||
let mut evtmut = event.as_event_mut(activation.context.gc_context).unwrap();
|
let mut evtmut = event.as_event_mut(activation.context.gc_context).unwrap();
|
||||||
let name = evtmut.event_type();
|
let name = evtmut.event_type();
|
||||||
|
|
Loading…
Reference in New Issue