Commit ad72f05 1 parent c5a4eee commit ad72f05 Copy full SHA for ad72f05
File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,26 @@ impl<'gc> LoadManager<'gc> {
332
332
loader_url : Option < String > ,
333
333
vm_data : MovieLoaderVMData < ' gc > ,
334
334
) -> OwnedFuture < ( ) , Error > {
335
+ // When an AVM2 movie loads an AVM1 movie, that AVM1 movie cannot load
336
+ // another movie over itself, as in loadMovie(..., _root). Attempts to
337
+ // do so will be silently ignored.
338
+ //
339
+ // However, if the AVM1 movie uses MovieClipLoader.loadClip to load into
340
+ // its _root, FP32 will segfault. We don't reproduce that behavior.
341
+ if matches ! ( vm_data, MovieLoaderVMData :: Avm1 { .. } ) {
342
+ // This check works because the only time AVM1 can access an MC with
343
+ // `loader_info` set is when that MC is the root MC of an AVM1 movie
344
+ // that was loaded by AVM2
345
+ if target_clip
346
+ . as_movie_clip ( )
347
+ . and_then ( |mc| mc. loader_info ( ) )
348
+ . is_some ( )
349
+ {
350
+ // Return a future that does nothing
351
+ return Box :: pin ( async move { Ok ( ( ) ) } ) ;
352
+ }
353
+ }
354
+
335
355
let loader = Loader :: Movie {
336
356
self_handle : None ,
337
357
target_clip,
You can’t perform that action at this time.
0 commit comments