avm1: For good measure, also unload on empty URL in `ActionGetURL`.
This commit is contained in:
parent
bb5c367e91
commit
1a77874e04
|
@ -1173,6 +1173,12 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
|
||||||
let fetch = self.context.navigator.fetch(&url, RequestOptions::get());
|
let fetch = self.context.navigator.fetch(&url, RequestOptions::get());
|
||||||
let level = self.resolve_level(level_id);
|
let level = self.resolve_level(level_id);
|
||||||
|
|
||||||
|
if url == "" {
|
||||||
|
//Blank URL on movie loads = unload!
|
||||||
|
if let Some(mut mc) = level.as_movie_clip() {
|
||||||
|
mc.replace_with_movie(self.context.gc_context, None)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
let process = self.context.load_manager.load_movie_into_clip(
|
let process = self.context.load_manager.load_movie_into_clip(
|
||||||
self.context.player.clone().unwrap(),
|
self.context.player.clone().unwrap(),
|
||||||
level,
|
level,
|
||||||
|
@ -1182,6 +1188,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
|
||||||
);
|
);
|
||||||
self.context.navigator.spawn_future(process);
|
self.context.navigator.spawn_future(process);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Err(e) => avm_warn!(
|
Err(e) => avm_warn!(
|
||||||
self,
|
self,
|
||||||
"Couldn't parse level id {} for action_get_url: {}",
|
"Couldn't parse level id {} for action_get_url: {}",
|
||||||
|
|
Loading…
Reference in New Issue