Decrement clone counter only if it's clone

This commit is contained in:
apple502j 2020-04-22 11:03:30 +09:00 committed by GitHub
parent f5ce73ae51
commit 2c6299bb56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);