Fix crash on opening new buffer with vty frontend.