Upstream NPE fix when clicking outside a window then back in (...

merging upstream fix from [commit: e2a0995](https://github.com/Arcnor/pixel-dungeon-gdx/commit/e2a0995f2cfce4db2454626030dea04cd4862206)