avm1: For good measure, also unload on empty URL in `ActionGetURL`.

This commit is contained in:
David Wendt 2020-09-28 20:03:16 -04:00 committed by Mike Welsh
parent bb5c367e91
commit 1a77874e04
1 changed files with 15 additions and 8 deletions

View File

@ -1173,14 +1173,21 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
let fetch = self.context.navigator.fetch(&url, RequestOptions::get());
let level = self.resolve_level(level_id);
let process = self.context.load_manager.load_movie_into_clip(
self.context.player.clone().unwrap(),
level,
fetch,
url,
None,
);
self.context.navigator.spawn_future(process);
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(
self.context.player.clone().unwrap(),
level,
fetch,
url,
None,
);
self.context.navigator.spawn_future(process);
}
}
Err(e) => avm_warn!(
self,