Upstream NPE fix when clicking outside a window then back in (commit: e2a0995)
Merge pull request #6 from prurigro/upstream-npe-bugfix

fix when clicking outside a window then back in