Applied karlvr's suggested fix for the Lanczos resampling filter's renderTarget crash, based on pull request #880.