core: Fix panic on unsetting self-referential masker
This commit is contained in:
parent
261ba7374e
commit
48db0e23c4
|
@ -1666,7 +1666,8 @@ pub trait TDisplayObject<'gc>:
|
|||
remove_old_link: bool,
|
||||
) {
|
||||
if remove_old_link {
|
||||
if let Some(old_masker) = self.base().masker() {
|
||||
let old_masker = self.base().masker();
|
||||
if let Some(old_masker) = old_masker {
|
||||
old_masker.set_maskee(gc_context, None, false);
|
||||
}
|
||||
if let Some(parent) = self.parent() {
|
||||
|
@ -1686,7 +1687,8 @@ pub trait TDisplayObject<'gc>:
|
|||
remove_old_link: bool,
|
||||
) {
|
||||
if remove_old_link {
|
||||
if let Some(old_maskee) = self.base().maskee() {
|
||||
let old_maskee = self.base().maskee();
|
||||
if let Some(old_maskee) = old_maskee {
|
||||
old_maskee.set_masker(gc_context, None, false);
|
||||
}
|
||||
self.invalidate_cached_bitmap(gc_context);
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
// compiled with mxmlc
|
||||
|
||||
|
||||
package {
|
||||
import flash.display.MovieClip;
|
||||
|
||||
public class Test extends MovieClip {
|
||||
public function Test(){
|
||||
var mc = new MovieClip();
|
||||
this.mask = this;
|
||||
this.mask = mc;
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
# tests a probable (no access to original repro) cause of
|
||||
# https://github.com/ruffle-rs/ruffle/issues/14747
|
||||
num_frames = 1
|
Loading…
Reference in New Issue