mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-11 13:01:18 -04:00
Decrement clone counter only if it's clone
This commit is contained in:
parent
f5ce73ae51
commit
2c6299bb56
1 changed files with 3 additions and 1 deletions
|
@ -1114,7 +1114,9 @@ class RenderedTarget extends Target {
|
|||
* Dispose, destroying any run-time properties.
|
||||
*/
|
||||
dispose () {
|
||||
this.runtime.changeCloneCounter(-1);
|
||||
if (!this.isOriginal) {
|
||||
this.runtime.changeCloneCounter(-1);
|
||||
}
|
||||
this.runtime.stopForTarget(this);
|
||||
this.runtime.removeExecutable(this);
|
||||
this.sprite.removeClone(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue