Fixed segfault on leaving the editor.