Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrement clone counter only if it's clone #2353

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

apple502j
Copy link
Contributor

Resolves

Resolves #505
Resolves #2352

Proposed Changes

Decrement clone counter only if it's clone

Reason for Changes

RenderedTarget.dispose is called when the target gets disposed somehow, including deleting a sprite or its clone. This makes the clone counter go below 0.

@adroitwhiz
Copy link
Contributor

Any reason not to remove the decrement inside Sprite.removeClone (specifically, inside the if (cloneIndex >= 0) block, since removeClone is called regardless of whether sprites are clones)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants