null check, there doesn't have to be a current window