Editor crash when clicking on editor viewport

I fixed the error. I changed the texture data of InputTexture while the scene was rererendered due to interactions (for example selecting an actor). The solution was to create a swap texture which will get updated before drawing it.