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

Texture.EMPTY should be not destroyable #2460

Closed
Kouty opened this issue Apr 6, 2016 · 4 comments
Closed

Texture.EMPTY should be not destroyable #2460

Kouty opened this issue Apr 6, 2016 · 4 comments

Comments

@Kouty
Copy link

Kouty commented Apr 6, 2016

An empty texture, used often to not have to create multiple empty textures.

Texture.EMPTY = new Texture(new BaseTexture());

Well, very useful, but when executing container.destroy(true), you may destroy this EMPTY texture too.
Shouldn't it an immutable object? Or at least not destroyable?

I suggest to add the following line to pixi code, to fix this problem.
Texture.EMPTY.destroy = function(){};

@GoodBoyDigital
Copy link
Member

good shout! fancy making the PR? cheers!

@ivanpopelyshev
Copy link
Collaborator

It is merged in dev (v4) #2464

@Kouty
Copy link
Author

Kouty commented Apr 7, 2016

Thanks!

@lock
Copy link

lock bot commented Feb 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants