fix crash caused by missing check on editor->own_window()