[Analyzer-2108] Fixing potential NPE on window resize