Floating window: Fix possible NPE