Ensure that the buffer is alive before we try to find its window.