guard against dead wx object