Fixed NRE after leaving editor.