Closed Doppp closed 6 years ago
Thanks a lot for the pull request! Indeed, that dispose
should not be called twice, as it is now — good catch!
I'd even go so far as to remove that dispose
call inside RenderTexture completely. The active texture is always created in the constructor via Texture.empty()
— and that returns either a concrete texture, or a sub-texture that owns its parent. Either way, super.dispose()
will take care of it. So I'll remove that call completely.
Thanks again!
... and I realized it needs to be done in a slightly different way (see above commit). :wink:
Thanks very much, @PrimaryFeather!
_activeTexture was being disposed twice once in RenderTexture and once in SubTexture. Only dispose it in RenderTexture if SubTexture isn't going to dispose it.