Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.82k stars 821 forks source link

Filter Chain: Null Object Reference when empty #1063

Closed Adolio closed 4 years ago

Adolio commented 4 years ago

Hi Daniel!

I just discovered that FilterChain doesn't like to be empty and I was wandering if this was intended by design?

He is a simple code to reproduce:

var quad:Quad = new Quad(1, 1);
quad.filter = new FilterChain();
addChild(quad);

Best, Aurélien

PrimaryFeather commented 4 years ago

Excellent point, Aurélien! I fixed that right away. Now, an empty FilterChain just acts like a standard FragmentFilter — which should make some situations easier to handle.

Thanks for making me aware of this!

Adolio commented 4 years ago

😃 Thanks a lot Daniel!